Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Step by step compilation/deployment of EJB 3.0

 
Lukas Kavofil
Greenhorn
Posts: 7
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Danil TuchkoFf
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start using maven. Sooner or later you 'll come to that, and without detrimental effects to undestand the whole process(eg IDE)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic