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 Step by step  compilation/deployment of EJB 3.0 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 "Step by step  compilation/deployment of EJB 3.0 " Watch "Step by step  compilation/deployment of EJB 3.0 " New topic
Author

Step by step compilation/deployment of EJB 3.0

Lukas Kavofil
Greenhorn

Joined: Jun 30, 2012
Posts: 7

Hello guys,

sorry, I know this is basic question and there should be a lot of stuff about it in books/internet, but I just cant find the necessary info even after hours of searching.

What I am looking for is basic explanation (STEP BY STEP) how to compile and deploy the EJB 3.0 classes to try Hello World bean and its client and to have some background behind it explained.

Problem is that in most books and tutorials, the compilations is done by pred-defined build tool like Ant or when I am able to find normal tutorial it is not for EJB 3.0 but 2.0 or uses Eclipse IDE.

Lets say we have stateless bean which has method echo() which returns 'Hello world' String.

The client could be POJO run from commandline and interacting with the bean.

Can someone explain to me how to write, compile and deploy this (preferably on JBOSS), using just javac commands?

Thanks a lot.


Degree in finance. Java/programming enthusiast. OCJP.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1085
    
  10

If you don't wan't to use IDEs, then, rather than using just javac, you should look to use command-line tools like Ant or Maven. Note that, these tools are independent of IDEs.
The IDEs include them as a convenience for us.

If you want to use only javac, sure, no problem. You need to set the classpath that includes the necessary libraries (java jee jars in this case) which are needed at compile time. You can then use the jar command to create the war/ear and then manually copy them to the specified folder in the server for deployment.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Danil TuchkoFf
Greenhorn

Joined: Dec 11, 2012
Posts: 3
Start using maven. Sooner or later you 'll come to that, and without detrimental effects to undestand the whole process(eg IDE)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Step by step compilation/deployment of EJB 3.0