Tuesday, January 29, 2008

Issues with SOAP address location in EJB 3.0

I am deploying my EJB 3.0 application on 3 servers for right now; JBoss, GlassFish and Oracle Application Server.
I have a simple Stateless Session Bean with the appropriate WebService annotations.
When I deploy my application to these 3 servers, each one has a different WSDL URL.

The name and serviceName are as specified in the @WebService annotation.

@WebService(name="HelloManager", serviceName = "HelloManagerService", targetNamespace = "urn:HelloManagerService")

There is however some consistency between JBoss and Oracle. They use the following notation:

soap:address location="http://hostname:portname/earfilename/name"

For e.g:
soap:address location="http://localhost:8080/ejb3webservices/HelloManager"


GlassFish on the other hand, uses the following notation:

soap:address location="http://hostname:portname/servicename/name"

For e.g:
soap:address location="http://localhost:8484/HelloManagerService/HelloManager"


I am trying to use SOAP UI to test my web services once they are deployed using Ant.

I didn't see any reference in the EJB 3.0 spec regarding the WSDL location. Is this vendor specific? Is there any place where we can customize the WSDL?

Also, I don't see any configurable attribute in the documentation for the @WebService annotation.

Saturday, January 26, 2008

Several Exciting New Books For Web Developers

I was preparing my draft for interviewing some of the authors for Manning as well as Apress, and browsing their web sites for updates. There are several new books for web developers which have been published recently or coming soon.

The following 2 books are being published by Manning and the print edition will be available in a few days.

1. Laszlo in Action by Norman Klein and Max Carlson with Glenn MacEwen

2. jQuery in Action by Bear Bibeault and Yehuda Katz

The 3rd book from Apress is on Struts 2

3. Practical Apache Struts 2 Web 2.0 Projects by Ian Roughley

Have you read any of these books? Are you planning on buying these?

Friday, January 25, 2008

The SpringSource Certification Program Announced

For those of us who have been working on Spring for many years now, we have a wonderful opportunity to take this exam. So, who can write the Exam is a big question since they do have some requirements and they are as follows:
Quote from SpringSource:
Eligible individuals can register to take the Spring Framework Professional certification examination, via the web, at one of over 4500 world-wide testing facilities, and can begin taking the exam on 31 January 2008. A person is eligible for registration if he or she has recently taken the 4-day “CoreSpring” class from SpringSource (or a SpringSource certified training partner in Europe, Africa or the MiddleEast (EMEA)). A person may also be eligible for registration, without attending the 4-day course, if he or she can demonstrate having significantly contributed to the Spring community or can provide a reference to a Spring development effort in which he or she was actively involved. This person is referred to as a “grandfathered” candidate.


I did contact Daryl Heinz Director of Training for SpringSource, Inc. with just one question. Please explain how we can provide a reference to show that we are using Spring in our Development?

Daryl replied back immediately with all the details. We just need to provide the contact information of our Manager so that SpringSource will be able to validate that we indeed have experience using Spring.

You can find all the details about the Certification here:

1. SpringSource Certification Program

I am really excited to take this Exam, how about you?

Wednesday, January 23, 2008

New features in EJB 3.1 : Article on ServerSide.com

Reza Rahman, co-author of the book "EJB3 in Action", has an article in TheServerSide.com which gives a preview of the next version of Java EE spec EJB 3.1.

You can read the article here:
1. New features in 3.1


The ones I am interested are:

1. Support for stateful web services via Stateful Session Bean web service endpoints.
2. The standardization of JNDI mapping. I had to workaround a solution for testing on 3 different application servers, JBoss, Oracle and GlassFish. Each of them have completely different naming convention for the Remote Interfaces.

The GlassFish AS uses the fully qualified name of the remote business interface as default.
Object obj = initialContext.lookup("com.os.ent.CustomerManagerRemote");

JBoss on the other hand uses the Application Name, followed by the EJB name and followed by /remoteconstant.
Object obj = initialContext.lookup("ejb3sampleapp/CustomerManager/remote");

Oracle, uses the name specified in the @Stateless annotation.
Object obj = initialContext.lookup("CustomerManager");


What new features are you looking forward in the coming version?

Friday, January 18, 2008

Which one do you prefer; Liferay or JBoss Portal?

The book "JBoss in Action" has 2 chapters dedicated to JBoss Portal.The book covers JBoss Portal 2.6.1 running in JBoss Application Server 4.2.1. I haven't yet downloaded and tried this version.

But, I had tried Liferay 4.0 and JBoss 2.4 in early 2007 at work. We found Liferay more user friendly than JBoss; especially while using the Management Portlet. We finally scraped the idea of using Portals since there was indeed a huge learning curve.

Both of these complies with JSR 168.

With several releases from both these vendors, I am curious to know which one you would prefer.

Liferay or JBoss, which one are you using?

Thanks to all those who commenetd. The links you added(and the ones I added) were not displayed properly. So, I have added them here as well for your convenience.
1. InfoWorld - Comparision of Liferay and JBoss portal
2. JBoss Portal Presentation
3. Creating new Themes in Liferay

Friday, January 4, 2008

Error in OC4J Version 10.1.3.3.0 Ant Tasks

I have been trying to write Ant tasks to deploy, undeploy applications as well as create,delete and test data sources and connection pools using OC4J 10.1.3.3.0 for Oracle Application Server.

The deployment and undeployment went smoothly with no problems at all.

But, once I started working on Data Sources and connection factories, I started getting errors like the following:

Problem: failed to create task or type antlib:oracle:testDataSourceConnectionPool
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.

This appears to be an antlib declaration.


You will not find any documentation at all since these tasks are not in the Documentation. I looked at many samples provided and all of them had the old tasks. I finally looked at the Ant jar file and was able to find the correct task names.

The task addDataSourceConnectionPool was replaced with createJDBCConnectionPool, addManagedDataSource with createManagedDataSource, and testDataSourceConnectionPool with testConnectionPool.

I am not sure about other tasks, but these are the ones which I changed to get my build files working and happy.

You can find detailed documentation for OC4J Ant Tasks here.