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 How to deploy ejb in weblogic6.1 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 "How to deploy ejb in weblogic6.1" Watch "How to deploy ejb in weblogic6.1" New topic
Author

How to deploy ejb in weblogic6.1

Thanigaivel Vinayagam
Greenhorn

Joined: Dec 03, 2002
Posts: 2
Hello , i am new to EJB , i have no expericene in ejb, tell me how to deploy ejb in weblogic6.1
Balaji Natarajan
Greenhorn

Joined: Dec 05, 2002
Posts: 28
I AM VERY NEW TO THIS TECHNOLOGY SO PLEASE CORRECT ME IF I MISGUIDE SOMEONE.....
hi,
i am also new to EJB..i will just tell u how i deployed my first bean..Actually the Bean i used was a state less session bean..hope u r familiar with the Home and Remote Interfaces..make urself available with the Following files...
1. Home Interface.
2. Remote Interface.
3. Actual Bean.
The Above three files r Java Files...
Then u need the Following two descriptor Files.
1. ejb-jar.xml
2 weblogic-ejb-jar.xml
Then the Last file is ur Client.java File...
Now I tell u how to Organise these files..
Create a directory say, demo...
then Create two Subdirectories inside demo..
say, ejb and META-INF
put the home,remote,bean java files inside the ejb directory...
put the XML files inside META-INF directory...
Now u put the Client.java in the demo directory. i.e. at the same level of ejb and META-INF.

Now u need the Following installed in ur Comp.
1. JDK 1.2
2. Weblogic 6.1

Compile the Java files inside the ejb directory using "javac *.java"
now u hav to create the jar file....for that u go to the Command Prompt..and stay inside the demo directory..now give the Follwing command...
"jar -cvf x.jar ejb\*.class META-INF"
Now u should see the x.jar file in the demo directory...

Now it's time to deploy....
give the following command.
"java weblogic.ejbc x.jar y.jar"
u should see the y.jar in the demo directory....
then compile the Client.java file....

Now u hav to specify the y.jar file in the weblogic.properties file in the weblogic directory....
open that weblogic.properties file in notepad...
Search for the Pattern
"weblogic.ejb.deploy=\"
i think for first time this line will be marked as comment with a leading # symbol. remove that # and in the next line add ur y.jar path....eg. d:/demo/y.jar note the Forward slash.. don't give any backward slash in the path..if u give a backward slash u hav it twice...better stick to single forward slash..save the file...
now open a new command Window and go to the weblogic directory...now run the startweblogic batch file...it will start the weblogic server...
now go to ur previously opened command window...and run the Client.class file.....

u should get the Bean running properly......
if u hav any doubts...post ur doubts....
ALL THE BEST....
parag Chatterjee
Greenhorn

Joined: Aug 02, 2002
Posts: 28
All the steps mentioned by you are OK.But you should deploy the y.jar using Weblogic Admin Console instead of using weblogic.properties.
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
also to deploy u can use

before doing this make sure that u weblogic.jar file is in ur classpath
for more information visit http://edocs.bea.com/wls/docs61/ejb/deploy.html#1054980


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to deploy ejb in weblogic6.1