Wednesday Aug 30, 2006

Are JavaEE5 applications simple portable between particular servers?

I would like to verify whether Enterprise applications with JavaEE5 specifications are really portable between particular application servers. I believe that way could be more direct then for J2EE 1.4 when user should struggle with server specific deployment descriptors. I used simple enterprise applications that are included in NetBeans 5.5 (see File -> Samples -> Enterprise). These applications are developed and tested on Glassfish. Almost all advantages of the new specification are presented in these samples. I decided to migrate these samples on JBoss 4.0.4.
At the beginning, I realized that JBoss supports JavaEE5 specification only for EJB module not for Web and Ent application module. Therefore, no injection in these modules. Ok, I can use old approach with JNDI lookup. In the Glassfish you can use default JNDI name of interface that is fully qualified name of interface. This is very easy, isn't it? However, JBoss doesn't support this since it uses a little bit convention like: name of application/name of bean/interface(loca,remote). It means, all EJB clients should be changed.
I remeber, that mappedName attribute where JNDI name of bean could be used. I know that this is a product specific name but Glassfish use this as JNDI. However, this doesn't work on JBoss since they decided to drop this feature, see link. Also, one entity class uses two relations with EAGER fetch type since the related objects are used outside transaction. I realized that JBoss doean's support this configuration and workaround described here must be used.
I ended with many changes in my samples and tied application with specific server. The portability dropped away in my case. I see as the most important issue with different JNDI names in particular servers. Does JavaEE5 spec resolve this issue? Is there defined default JNDI names for stateless/stateful beans?
About

pblaha

Search

Categories
Archives
« August 2006 »
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
31
  
       
Today
Bookmarks