Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling EJBs

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJBs, I have created EJB files, but I have no idea how to compile them. Do I need a special EJB complier.
I have down Loaded the BEA WebLogic server for EJB Deployment.
Thank you for any Help TE
 
Siva Jagadeesan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No you don't need any special compiler, you can use "javac". But make sure you have j2ee.jar is in your classpath.
There is veru good documentation to run a "HelloWorld" kind of program in BEA website.
I will advice to go over that.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18218
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need a special compiler, but producing an EJB specifically for WebLogic does require that it generate some additional support classes. The java application weblogic.ejbc will do that for you - its use for WLS 6.1 is documented here: http://e-docs.bea.com/wls/docs61/ejb/EJB_utilities.html#1075296
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recommend jakarta ant... very powerful.
 
Erik Hatcher
Author
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ant's <ejbjar> task is capable of invoking Weblogic'c ejbc utility. See http://jakarta.apache.org/ant/manual/OptionalTasks/ejb.html#ejbjar_weblogic
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since WebLogic 6, you don't have to run ejbc if you don't want to.
If you deploy just the javac-compiled ejb .class files in your ejb jar (or "exploded" directory), the server will "run ejbc" for you when the ejbs are deployed.
Running ejbc manually does have the advantage that it will point out errors you might have in your beans or deployment descriptors. Finding out these things during "the build" is good. It also makes a jar that the server can consume more efficiently.
But skipping it and just tossing the jar at the server is sometimes convenient and occassionally more fun (if you're into that sort of thing).
 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you everyone I will go over each reply, it will give me good experience.
TE
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic