I very confusing when wanna to run EJB application because every different tutorial have different EJB server. Is the EJB application able to work with different vendor EJB server? p/s: i have EJB tutorial from Sun and Gopalan.
Yes, your EJBs should run in any server. That is after all one of the main strengths of Java, being portable. What does change between servers, however, is the "deployment descriptor". This is an XML file that you package with your Java classes, that describes to the server how to install your EJB.
Its not quite that simple, there are different versions of the EJB standard, I believe that EJB 1.1 is a fairly safe bet, but some app servers support EJB2.0 or have "exotic" extentions to the existing standards -- so write to a standard, and you should be fine. Also, you can have JDBC driver problems, the ODBC-JDBC bridge that comes as standard, for example is pretty hopeless. When moving platform, make sure that you have a suitable DB driver.
EJB is a component model from javasoft to build portable enterprise applications from reaydmade components from the marketplace... if you stick to the specification your application shud be easily portable to any other app server without a single issue... some app servers support non standard things and programmers opt for it because of ease or some vendor specific optimizations.. so you might end up having issues while porting to app other server...
Originally posted by chauryih see: I very confusing when wanna to run EJB application because every different tutorial have different EJB server. Is the EJB application able to work with different vendor EJB server? p/s: i have EJB tutorial from Sun and Gopalan.
[This message has been edited by Priyank RASTOGI (edited September 11, 2001).]
Writing EJBs for the most part is the easy task, and unless you are doing anything that would particularly tie you to that container, then the bean itself should be easily portable. Where all the demons enter is in the deployment part. All beans have a standard deployment descriptor (ejb-jar.xml) which again should be consistent across whatever container. However, many containers require additional deployment information. This is for things like configuring the datasource and any other reources that the beans use. The 2.0 spec is a bit more standardised than 1.1 as it introduces the EJB Query Language for defining finder methods (rather than whatever langauge the container had provided). So for example, you'll now find it a bit easier to write the weblogic-jar and weblogic-cmp-jar files. ------------------ Craig Berry Author of Professional EJB
Craig Berry<br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861005083/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional EJB</a>