Bidvertiser

Monday, October 5, 2009

How to access office 2007(OOXML) from Java

Apache POI is the solution you are looking for. The project made java developers life simple to read and write excel, word and powerpoint files. I have used Apache POI 3.1 which helped me to read Office 2003 documents.
When microsoft released office 2007 it used OOXML formats such as XLSX and DOCX, which limited POIs capabilities. The earlier versions of POI used OLE 2 Compound Document format, and now you can easily read or write excel, doc(97-2007).
The latest release POI 3.5 final came out in 28-September-09 and I am very eager to use it for my project and I swear u will be eager too.

Tuesday, September 29, 2009

What to expect for hiring a fresh java engineer?

I was in the process of hiring fresh java candidates for my team. During the process most of the time the guy who could answer well in technical personal/phone interview could not do well in the written test. And who did average in personal/phone interview was able to score better in the written test.

Should I have to go with the my intuition or should I have to follow what was put on the paper? Still haven't found the answer. After a deep thought I came up with few points to consider while hiring a fresh java engineer.
  1. Do not even ask questions from what he doesn't know. (JavaAPI is big and can not expect any one to remember each and every class and methods of it.)
  2. Instead find that he really understands what he knows or is he a book worm.
  3. Ask yourself whether he/she can fit well into my team and can he/she get the work done.
  4. Look whether the candidate is good at problem solving. Programming is all about problem solving so give a business problem and try to check how solves it.
  5. Does he has a good communication, grasping and able to explain the concepts which he knows well.
  6. Does he/she loves programming or he wants a job desperately.
I am sure I have left lot of other aspects to be considered, but still the above 6 looks very important to me. What are your thoughts?

Thursday, September 17, 2009

Best Java based open source eCommerce Software

There are a number of open source java based ERP softwares. Listing few good ones here

The Open For Business (OFBiz) project is an open source enterprise automation software project licensed under the MIT Open Source License. By open source enterprise automation we mean: Open Source ERP, Open Source CRM, Open Source E-Business / E-Commerce, Open Source SCM, Open Source MRP, Open Source CMMS/EAM, and so on.
SourceTap's CRM application is a highly flexible Sales Force Automation (SFA) tool that meets both the needs of sales managers and the sales rep. SourceTap's CRM includes Sales Force Automation (SFA), marketing, campaign management, and customer service.
Compiere is a Open Source ERP software application with fully integrated CRM software solutions. Compiere is a fully integrated business solution for small-to-medium enterprises worldwide. Compiere is based on business process rather then departmental boundaries.
Centric CRM is an enterprise-class Open Source Customer Relationship Management web application that allows companies to better develop and maintain customers. Key application modules include Sales, Help Desk, Project Management, Communications, and Document Management. The license prevent the redistribution of the source code.
Openbravo is an open source ERP solution designed specifically for the SME (small to midsize firm). Developed in a web based environment, it includes many robust functionalities which are considered part of the extended ERP: procurement and warehouse management, project and service management, production management, and financial management. Additionally, this same application seemlessly integrates the rest of the areas, starting with a management scope directly helping clients with its CRM (Customer Relationship Management) and BI (Business Intelligence).

And there are more. A quick googling would produce more results.

KonaKart is an affordable java based shopping cart software solution for online retailers. Let KonaKart help increase your eCommerce sales.
In my views after a trial with konakart, I would rate it as the best eCommerce / Shopping cart software.

Tuesday, September 1, 2009

P6Spy Open Source Framework to detect database performance bottlenecks in Java applications

What is P6Spy?
P6Spy is an open source framework for applications that intercept and optionally modify database statements. The P6Spy distribution includes the following modules:
  1. P6Log. P6Log intercepts and logs the database statements of any application that uses JDBC. This application is particularly useful for developers to monitor the SQL statements produced by EJB servers, enabling the developer to write code that achieves maximum efficiency on the server. P6Spy is designed to be installed in minutes and requires no code changes.
  2. P6Outage. P6Outage detects long-running statements that may be indicative of a database outage proble and will log any statement that surpasses the configurable time boundary during its execution. P6Outage was designed to minimize any logging performance penalty by logging only long running statements.
P6Spy includes installation instructions for JBoss, ATG, Orion, JOnAS, iPlanet, WebLogic, WebSphere, Resin and Tomcat.
What if you want it inside your favorite Eclipse IDE?
Don't worry there is an eclipse plugin for you here.

Monday, August 31, 2009

org.tigris.subversion.javahl.ClientException: Attempted to lock an already-locked dir svn

I had this error when I tried to update my source directory of my project. The reason for this exception is unsuccessful previous commit/update with svn. For example when you close your eclipse when a transaction takes place.

How do I resolve this issue?
  1. Right Click your project and select Team --> Cleanup
  2. Now try to do your update/commit
Try to do it at your project level since even if you try cleanup at source level and if the project has a lock, you will still not be able to do an update/commit.

Thursday, August 27, 2009

James Gosling's Toy show

Best practices for SAAS implementation using an Open Source Portal (JBoss)

Introduction
JBoss Portal is a very popular open source portal offering from Red Hat. It is JSR-168 compliant and
provides support for deployment in a clustered environment with high-availability. The JBoss Portal framework
provides support for features like customizable UI tier using themes and skins, creating workflows using a
process server and also supports SOA.
In this article we will explore various design approaches to implement a SAAS application using
JBoss as the portal vendor.
Some of the key considerations in implementing a SAAS solution involve:
1) Addressing MultiTenancy
2) Providing a unique user experience
3) Keeping user/tenant data separated and secure
4) Having a SOA based architecture and using Web Services based messaging for the middle-tier
or business layer.
MultiTenancy
Multi-tenancy refers to the ability to host a software solution that serves multiple client organizations
or tenants. Its scope includes:
1) Application customization
2) Data isolation
3) Security isolation
Portlet design considerations for multitenancy
Application customization:
A portal implementation offers a lot of features which can be leveraged to provide a customized feel for
every tenant. Each portlet can be made configurable for each subscriber. To enable a high level of reuse,
the degree of configurability in the portlets must support subscriber-specific settings in a range from name and-value pair configurations, such as subscriber IDs or subscriber's service endpoints, to subscriberspecific
look-and-feel. JBOSS can provide a clone-and-configure approach to the implementation and
deployment of the portal in multi-tenant applications i.e. the ability to clone a portal and configure it. JBoss
like many other portal vendors supports the concept of a virtual portal which is a logical copy of an existing
portal utilizing the same hardware and software resources.
Security Isolation:
Each virtual portal supports isolation of user populations for each tenant bank through a multi-tenant LDAP
tree structure in a single instance of a directory Server. A sample scenario as outlined by folks at IBM
involve the following steps which can also be recreated in JBoss
1) Create a multitenant user directory structure in LDAP by:
- Create a realm for each tenant i.e. a separate tree hierarchy starting at dn [dc=tenant1, dc=com]
- For each security realm, a new partition and security context entry must be created in the server.xml
configuration file in Apache Directory Server (Apache Directory Server Install Directory / instances /
default /conf /server.xml)
2) Dynamic LDAP routing with Spring security
The basis of dynamic LDAP routing hinges on the possibility of dynamically selecting the LDAP
security context at run time based upon a lookup key. In a multitenant environment, this translates to
authenticating and authorizing against an LDAP source that is derived on the fly based on the tenant's
ID.
Providing a unique user experience:
Unique User Experience is providing a different User Interface to different users as per the application
scope. Unique User Experience consists of look and feel , structure and scope for every user role.
Using the model proposed by Jesse Richard Dalton we attempt to show how a Unique User Experience
(UUE) can be provided to tenants using Jboss.
JBoss provides a lot of features which can be utilized to create a distinct look and feel that is also
consistent with the organization branding. Also it provides flexibility to the tenant to customize the look and
feel based on their specific business requirements.
At a high level providing a UUE can be divided into the following 4 S’s:
1. Surface
2. Skeleton
3. Structure
4. Scope
Surface is the client-facing element directly visible to the client. This layer is supported by themes and skins
of the portal application. Themes and skins control the overall look and feel of all the pages in a Portal.
Changes to them are made via updating stylesheet classes provided by JBoss. Themes and skins can be
set at a virtual portal level. They can also be set at a user level based on the user role and access. This can
be done dynamically in the application or can be set by an Admin using the portal’s administrative console.
Skeleton is responsible for ensuring that the page architecture and layout are as per the user needs and
can be customized. A UUE in this context can be achieved through providing different layout options of the
page. By default there are three types of layouts: - right, center and left.
Structure is the next element of UUE. Structure differentiates a site or application as per the organization,
line of business and user needs. A virtual portal provides a quick way to achieve this objective.
Virtual Portals are logical portals that share the same hardware and software installation. Virtual portals can
also specify a default locale through portal’s administrative console to implement internationalization
functionality for organizations that require different languages to cater to their distinct global locations.
Scope includes access control and roles. Portal provides access functionality at the page level accessibility
for user role and user group. For example hiding certain sections or links on a page from anonymous users
or displaying content relevant only to a specific user group. Above that Portal also provides functionality at
the application.
Per the JSR 168 spec, portlet has 4 modes view, edit, config and help. View and help modes can be
available for all registered users or anonymous users. Edit mode can be available to registered users and
configuration mode is available only to administrator. These modes provide another level of customization
at the portlet level.
Separate and Secure Data Tier:
Implementing a Multi-Tenant database:
Key considerations while designing the multi-tenant database are consolidation, scalability and extensibility.
Each tenant can have its own extensions for base tables as per the requirement, forming the separate
logical schema for that tenant. Query transformation can be used to map these single-tenant logical
schemas to one multi-tenant physical schema. Available physical memory can limit the scalability of the
database.
The simplest approach to implement multi-tenancy would be to create private database structure for each
tenant. In this approach the database structure is replicated and customized according to the tenant’s
requirement. Accordingly query transformation becomes very simple but it puts overhead to physical
memory as the number of tables keeps growing when new tenants are added. Hence this approach gets
expensive in terms of memory.
Second approach could be to use Universal tables. Universal table is a very generic structure containing
data for all the tenants. Table schema includes the tenant column and the large number of generic columns
considering requirements of all tenants. Tenant column is used to identify which tenant the row belongs.
Columns from the logical source tables of each tenant are mapped to generic columns in universal table
which allows different tenants to extend same table in different ways. Keeping all values altogether in one
table avoids the reconstruction overhead. The disadvantage of this approach is that rows are unnecessarily
wide containing null values for those generic columns which do not belong to the tenant.
Base-Extension table layout can be the better approach to overcome the above mentioned disadvantages.
Here extensibility can be achieved by splitting the universal table in base and extension table. Base table’s
schema will have minimum required generic columns those used by all tenants. A separate extension table
is created for additional requirements of particular tenant. This extension table can be shared by other
tenants having the same extension requirement, which avoids creating unnecessary tables with the same
schema.

Wednesday, August 26, 2009

Developer toolsets for webservices

Taking SOAP and REST architectures into consideration.

What Toolkits are for SOAP
Apache SOAP (see also AXIS) (Apache project) [Full, Java] 2.3.1, 2001/06/10
AXIS (Apache project) [Full, Java] 1.0, 2002/10/07
TRLSOAP [not available] (IBM Research, Tokyo) [Full, Java] 0.72, 2000/11/24
Web Services Toolkit (IBM, alphaWorks) [Full, Java 1.3, LotusScript] 3.2.2, 2002/08/26
WASP for Java [login required] (Systinet) [Full, Java] 4.0, 2002/10/01
GLUE [registration required] (Graham Glass) [Full, Java] 3.2, 2002/10/08
eSOAP [login required] (Rosimildo da Silva) [Client, Java] 1.0, 2001/10/18
Java XML Pack [login required] (Sun) [Full, Java] summer02_01, 2002/07/31
Java Web Services Developer Pack (WSDP) (Sun) [Full, Java] 1.0_01, 2002/07/31
Web Services Kit for Java (Borland) [Full, Java] ?, ?
DevelopMentor SOAP [abandoned] (DevelopMentor) [Full, Java] 0.3, 2000/01/24
XSOAP (aka SoapRMI) (Indiana University) [Full, Java] 1.2, 2001/11/04
jBroker Web [login required] (Novell/SilverStream Software) [Full, Java] 2.0, 2002/06/24
X-Soap Toolkit [not available] (Xwaresoft.com) [Full, Java] 0.9, 2000/09/17
Spheon JSOAP (Florian Muller) [Full, Java] 0.4.1, 2002/06/29
Wingfoot SOAP [registration required] (Wingfoot) [Full, Java/J2ME/J2SE] 1.0, 2002/03/31
ZOAP [not available] (jBoss.org) [Full, Java] ?, ?
CapeConnect (Java Web Services) [registration required] (Cape Clear Software) [Full, Java] 2.0, 2001/05/11
HP Web Services Platform [discontinued] (HP) [Full, Java] 2.0.1, ?
Bubbles Project [folded into the Wingfoot SOAP] (Vivek Chopra) [Client, Java | PDA | KVM-based] ?, ?
kSOAP (Enhydra.org) [Client, Java 2 Micro Edition | PDA | KVM-based] 1.2, 2002/06/06
SoapWiz (SOAP toolkit for JBuilder) [login required] (Stephen Schaub) [Client, Java | JBuilder 4 | Win] 1.0, 2001/03/31
Vitiris Web Services Platform [login required] (Killdara/Interbind) [Full, Java] ?, ?
InstantXML [not available] (Tradia) [?, Java] ?, ?
SOAP for BEA WebLogic [no official support] (BEA Systems) [Server?, Java? | BEA WebLogic Server] ?, ?
XMLBus [registration required] (IONA Technologies) [Full, Java | iPortal AppServer, BEA WebLogic] 5.4, 2002/09/16
Business Integration Platform [not available] (Shinka Technologies) [Full, Java, Visual Basic, C++] 1.3, 2001/08/01
Microsoft SOAP toolkit (Microsoft) [Full, VB/C# | WinNT/2K] 2.0 SP2, 2001/06/21
Visual Studio .NET (Microsoft) [Full, .NET | WinNT/2K/98/Me] ?, ?
.NET Framework SDK (Microsoft) [Full, .NET | WinNT/XP/2K/98/Me] 1.1, 2002/10/03
Microsoft Web Services Development Kit (WSDK) (Microsoft) [Full, VB/C# | WinNT/2K] ?, 2002/08/26
4s4c (Simon Fell) [Server, COM | WinNT/2K] 1.3.8, 2002/03/02
pocketSOAP (Simon Fell) [Client, COM? | Win9x/Me/NT/2K/Pocket] 1.3.7, 2002/08/19
White Mesa (Robert Cunnings) [Full, C++ | COM | WinNT/2K] 2.7.2, 2002/07/28
vbSOAP [not available] (Phalanx Systems) [?, VB6.0] 3.0, 2002/03/13
SOAP component in IP*Works (Nsoftware) [Client, .NET/VB/VC++/Delphi/C++Builder | Win9x/NT] ?, ?
WebServer Tool [registration required] (Dart) [Full, VB/VC++/Delphi/C++Builder | COM | WinNT/2K] 1.6.0, ?
SOAP::Lite (Paul Kulchenko) [Full, Perl] 0.55, 2002/04/15
DevelopMentor SOAP [abandoned] (DevelopMentor) [Full, Perl] 0.28, 2000/09/05
PerlEx (ActiveState) [Server, Perl | WinNT/2K] 2.2.1, 2002/05/27
Secret Labs SOAP [abandoned] (Secret Labs) [Full, Python] 0.8, 2000/06/21
SOAP.py (Cayce Ullman) [Full, Python] 0.9.7, 2001/06/27
SOAPy (Adam Elman) [Client, Python] 0.1, 2001/04/26
ZSI: Zolera Soap Infrastructure (Zolera Systems, Rich Salz) [Full, Python] 1.3RC2, 2002/05/14
Web Services for Zope (Zope Corporation, Brian Lloyd) [?, Python] 1.0a, 2001/10/30
Lye -- COM to SOAP (Andrew Dalke) [Client, Python | COM clients] 0.1, 2000/09/14
WASP for C++ [login required] (Systinet) [Full, C++] 4.0, 2002/09/01
SimpleSOAP [not available] (Scott Seely) [Client, Visual C++] ?, 2001/01/13
C++ Library for SOAP Client (SQLData) [Client, C++ | WinNT/2K] 2.0, 2000/12/10
gSOAP (Robert van Engelen) [Full, C/C++] 2.1.10, 2002/10/14
SQLData SOAP Server (SQLData) [Server, C++ | WinNT/2K] 3.01, 2001/01/25
EasySOAP (David Crowley) [Client, C++ | Linux/WinNT/2K/POSIX] 0.6.1, 2002/06/10
eSOAP (Rosimildo da Silva ) [Full, C++ | Linux/Windows/RTEMS/eCos] 1.0, 2001/10/18
SOUP [abandoned?] (Ximian) [Full, C | Linux/Windows] 0.2, 2001/05/22
XMLRPC-EPI (Dan Libby) [Full, C | Linux] 0.50, 2001/09/26
OpenSOAP (OpenSOAP project) [Full, C] 1.0-20030110, 2003/01/10
SOAP to CORBA bridge (LifeLine Networks bv) [Full?, C++ | Linux/WinNT/2K] 2.0.5, 2001/10/15
Web Services for Mac OS (Apple) [Client, AppleScript | Mac OS X] 10.1, ?
SOAP toolkit LITE [registration required] (Lucin) [Full, ? | Windows 95/98/NT/2000] 2.3.0, 2000/09/18
SOAP for Frontier (UserLand) [Full, Frontier] ?, ?
SOAP for Ada (Michael Erdmann) [Full, GNU Ada | Linux SuSe] 0.1.5, 2002/10/03
anyService (Chris Bayes) [Client, JavaScript/XSLT | Win | IE/HTA] 0.3, 2001/05/15
SOAP client for IE 5.0 [not available] (Aaron Skonnard) [Client, JavaScript | Win | IE] ?, 2000/01
WebService Behavior (SOAP client for IE 5 and later) [not supported] (Microsoft) [Client, DHTML | Win | IE | HTC] 2.01, ?
XML Extras with SOAP (mozilla.org) [Client, JavaScript | Win | Mozilla] ?, 2000/12/28
Spray for Dolphin Smalltalk (Steve Waring) [Full, Smalltalk] 0.5, 2001/11/16
SOAP Smalltalk (Camp Smalltalk) [Client, Smalltalk] ?, 2000/10/03
VW Opentalk SOAP (Cincom Systems) [Full, Smalltalk] 1.0, 2002/07/01
SOAP4R (Nakamura Hiroshi) [Full, Ruby] 1.4.7, 2002/09/20
PHPSOAP [not available] (GigaIdeas) [Full, PHP] ?, ?
NuSOAP (SOAPx4) (Dietrich Ayala) [Full, PHP] 0.6.1, 2002/04/29
SOAP server class [not available] (Manuel Lemos) [Server, PHP] ?, 2001/06/09
phpXMLP [abandoned?] (phpApp.org) [Full, PHP] 0.10, 2001/08/19
PHP-SOAP (Brad LaFountain) [Full?, PHP] 0.1.1, 2002/05/02
PEAR-SOAP (PEAR development team) [Full, PHP] 1.0b1, 2002/10/12
eZ soap (eZ systems as ) [Full, PHP] 2.9-1, 2002/05/31
Oracle9i Application Server (Oracle) [Server, ?] R2, ?
Kafka Framework (Christopher Dix) [Server, XSLT] 0.9, 2001/04/05
SOAP for Tcl (Pat Thoyts) [Client, Tcl] 1.6.5, 2002/09/22
NSSOAP for AOLserver [abandoned?] (Lee Teague) [Client, C, Tcl] Not released yet
Web services in ColdFusion (Macromedia) [?, ColdFusion] MX, ?
webMethods Enterprise Web Services [registration required] (webMethods) [Full, - | Linux/Solaris/HP-UX/WindowsNT/2K] 4.6 SP2, 2002/10/16
MOO SOAP (Rob Sanderson) [Full?, MOO] 0.75, 2002/06/13
Virtuoso (Openlink) [Full, ? | Windows/Linux/Solaris] 2.5, ?
Pure SOAP (Pure Software Technology) [Full, Delphi] 0.0.4, 2001/01/28
Delphi 7 Studio (Borland) [Full, Delphi] 7.0, ?
wwSOAP (West Wind Technologies) [Full?, Visual FoxPro] 2.0, 2001/09/08
SoapOpera (SOAP-HTTP ORB) (Masashi Umezawa) [?, SqueakSmalltalk] 0.5beta4, 2002/10/09
SOAP taglib [not available] (Ulrich Mayring) [Client, XSP/taglib | Cocoon?] ?, 2001/04/05
What is a REST Web Service
The acronym REST stands for Representational State Transfer, this basically means that each unique URL is a representation of some object. You can get the contents of that object using an HTTP GET, to delete it, you then might use a POST, PUT, or DELETE to modify the object (in practice most of the services use a POST for this).
What Toolkits are for REST
REST is not a standard. You will not see the W3 putting out a REST specification. You will not see IBM or Microsoft or Sun selling a REST developer's toolkit. Why? Because REST is just an architectural style. You can't bottle up that style. You can only understand it, and design your Web services in that style.
While REST is not a standard, it does prescribe the use of standards:
HTTP
URL
XML/HTML/GIF/JPEG/etc (Resource Representations)
text/xml, text/html, image/gif, image/jpeg, etc (Resource Types, MIME Types)