File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Do EJB Clients Have to be Dependent on EJB Server Vendor? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Do EJB Clients Have to be Dependent on EJB Server Vendor?" Watch "Do EJB Clients Have to be Dependent on EJB Server Vendor?" New topic
Author

Do EJB Clients Have to be Dependent on EJB Server Vendor?

sever oon
Ranch Hand

Joined: Feb 08, 2004
Posts: 268
Hi all,

My company sells a product that's going to need to support customers' existing EJB container vendors: WebLogic, WebSphere, JBoss, etc.

1. I'm suggesting that we keep a standard EJB-spec EAR with no vendor-specific deployment descriptors or anything, and then at install time we insert the appropriate vendor-specific DDs into the EAR at that point. The other suggestion on the table is to simply include them all, since they're all named differently (we think), but I'm thinking we may see changes from one version to the next so we'll have to have our installer fill out the EAR at that point anyway (WebLogic 8.0, WebLogic 8.1, etc). Anyone have experience with this? What's the right thing to do?

2. We have clients that reside outside the web server/EJB container in their own standalone executable JAR (with a Main-Class, blah blah blah). To perform the JNDI lookup and contact the EJB, it seems the client needs to have a vendor-specific initial context factory. So, for instance, weblogic.jndi.WLInitialContextFactory for WebLogic. But we don't want the client to have a dependency on the weblogic.jar...preferably we don't want any vendor-specific jars in the client-side.

We've assembled a client jar that only has the EJB home and remote interfaces, etc...isn't that enough? Or do we absolutely have to make our client dependent on the vendor-specific jars? If so, does each vendor package up the stuff needed on the client side separately? I shouldn't have to be dependent on the entire weblogic.jar if I only need access to the weblogic.jndi package, right? For WebLogic, where would I find this client side jar?

It's going to create some serious problems for us if we need to build vendor- and version-specific stuff into the client-side pieces because we have clients that run several versions of WebLogic, and we'd want one single client to be able to contact the EJBs in all of them (assuming EJB 2.0 spec). If we need a client-side dependency on weblogic.jar, this won't be possible as far as I can see.

Thanks!
sev

[ October 12, 2004: Message edited by: sever oon ]
[ October 12, 2004: Message edited by: sever oon ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

1. I'm suggesting that we keep a standard EJB-spec EAR with no vendor-specific deployment descriptors or anything, and then at install time we insert the appropriate vendor-specific DDs into the EAR at that point. The other suggestion on the table is to simply include them all, since they're all named differently (we think), but I'm thinking we may see changes from one version to the next so we'll have to have our installer fill out the EAR at that point anyway (WebLogic 8.0, WebLogic 8.1, etc). Anyone have experience with this? What's the right thing to do?


I would prefer to insert vendor specific DD when required rather than putting all the vendors file together.

We've assembled a client jar that only has the EJB home and remote interfaces, etc...isn't that enough? Or do we absolutely have to make our client dependent on the vendor-specific jars? If so, does each vendor package up the stuff needed on the client side separately? I shouldn't have to be dependent on the entire weblogic.jar if I only need access to the weblogic.jndi package, right? For WebLogic, where would I find this client side jar?


You could specify the JNDI factory class etc in jndi.properties so that you dont hard code it. The vendor specific libraries are required at the client side.


Groovy
 
 
subject: Do EJB Clients Have to be Dependent on EJB Server Vendor?