• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

compiling ejb files

Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am to write an entity bean. i had written all the necessary files for the bean. now how do i compile them before making a jar file.what do i need for it ?
please let me know.
thank you,
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sri
You have to do following steps to create jar files.
(1) put all you java files into one package.
(2) copy META-INF folder i.e avilable in examples directory of weblogic,if you use weblogic.
(3) there you will find 2 or 3 xml file depending on you been suppose your bean is session 2 files are sufficient.
(4) change the file names according to you package and file names in that ejb-jar.xml file
(5) change the JNDI name in Weblogic-ejb-jar.xml file according to you client program.
(6) if your is Container Managed EJB you have to map you attribute name in table to you program variables name in Weblogic-ejb-rdbms-jar.xml file.
(7)After changing these properties compile you java file using
"javac -d . *.java" (put all your java file in one package)
(8)create jar file by using "jar -cvf jarfilenae.jar META-INF packagename" command.
(9)next command is "ejbc jarfilename.jar -d c:\weblogic\myserver\jarfilename.jar"
Thia will place your jar file in myserver folder of your weblogic server.
(10) Goto weblogic server properties,there you give jar file name in deployment properties.
Then start the Weblogic server.Run the client program
I think this is little bit confusing for first time.Keep on doing you will get it
I'm so happy! And I wish to make this tiny ad happy too:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic