Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

compiling ejb files  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
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,
sridevi
 
Venkat Ammisetty
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • 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
Bye
Venkat
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!