File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes deploying EJBs in WSAD 5.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "deploying EJBs in WSAD 5.0" Watch "deploying EJBs in WSAD 5.0" New topic
Author

deploying EJBs in WSAD 5.0

Monu Sharma
Greenhorn

Joined: Nov 27, 2002
Posts: 21
I am using WSAD5.0. I am also trying the Ed Roman examples. can anyone tell me how to deploy the EJBs in WSAD5.0 and where to place the test clients?


SCJP1.2<br />Monu Sharma
Maximilian Trenks
Ranch Hand

Joined: Jul 22, 2002
Posts: 104
Deploying under Websphere is a 3 step process.
First you need to create the java files, compile them and put the class files into a jar file (jar cvf name_of_jar_file.jar *.class).
Then you start the AAT (Application Assembly Tool). You need to create an application, a .jar file containing your EJBs and you can also add an application client. Second, you have to specify all necessary information you need to be able to start the generation of deployment descriptors (via menu in AAT). I cant tell you all the steps you have to do, but I suggest you look it up in the info center. Anyway I try to name the most important things: application name, jar file name, EJB name, home interface, remote interface, JNDI name for your bean, depending on what bean you use you must also specify primar key classes, attributes in case of CMP 2.0, references to resources and last but not least you have to specify references from the application client to the bean you use (otherwise no stub files are created for acessing the bean remote).
Third, you need to install the deployed_your_application.ear file in the Adminstration Console. After going through the steps you have to start the application in the Enterprise Application menu.
Now you can start the application client using the launchclient tool. Therefor set the path to include c:\websphere\appserver\bin and set the classpath to include the client.jar file (cant remember the precise name, but it should be found at c:\websphere\appserver\lib).
Next, find your application, this should look something like: c:\websphere\appserver\config\cells\your_server_name\applications\your_application_name.ear\
there start: launchclient your_application_name.ear
So this all the steps I was able to remember by heart. It took me nearly a year to understand J2EE and the application servers Weblogic, Websphere and JBoss. And still I don't know all necessary things. I hope I was able to shorten your time, however if you are totally new to J2EE it won't help you much.
Max


Student of Business Informatics<br />Kepler University Linz, Austria
Maximilian Trenks
Ranch Hand

Joined: Jul 22, 2002
Posts: 104
AAAAAAAAAARGL,
sorry for writing you this nice story.
Didn't see you asked for WSAD !!!
All the things mentioned above only apply when you work without a dev environment.
I didn't use an IDE, because in my diploma thesis on application servers it would add a factor (choice of the right IDE for the specific app server) that would influence the result of my research.
Really sorry !
Max
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by Monu Sharma:
I am using WSAD5.0. I am also trying the Ed Roman examples. can anyone tell me how to deploy the EJBs in WSAD5.0 and where to place the test clients?

I'm not familiar with Ed's examples (I'm sorry to say -- I've not read his book since the first edition). Does he use Application clients (with main() methods?) The answer to this question will strongly influence the answer...
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Monu Sharma
Greenhorn

Joined: Nov 27, 2002
Posts: 21
Hi Kyle Brown,
All those client programs are having standard main methods into them.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK, I suggest that you download this redbook that will walk you through the process of building your EJB's and generating deployment code.
The only thing that's not covered is how to build and start the application clients. That is covered in this thread.
Kyle
Monu Sharma
Greenhorn

Joined: Nov 27, 2002
Posts: 21
Thanks a lot Kyle,
I will try to follow the instructions and get back to u in case of any problems.
Anyway is their any newer version of ur book available which covers the WSAD ver 5.0?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
This should also be in a FAQ somewhere...
My book should be out for WSAD 5.0 sometime in early fall. We're writing it now.
Kyle
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deploying EJBs in WSAD 5.0