This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes Which Project To Create For JMS?? 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 » Engineering » IDEs, Version Control and other tools
Bookmark "Which Project To Create For JMS??" Watch "Which Project To Create For JMS??" New topic
Author

Which Project To Create For JMS??

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Hi Everyone,

I want to write a JMS code in Eclipse. I am very new to JMS. But the question is which project to select for creating a JMS? Would the EJB Project be good enough? Or do i have to select the Enterprise Application Project under JAVA EE?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

What kind of JMS-related code are you planning to write? If a message-driven EJB, then use an EJB Project. If a standalone client app, then use an Application Client Project. The Enterprise Application Project is meant to gather several other projects together into an EAR file - you usually do not add code to such a project.


JBoss In Action
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Thanks Peter for the reply! I was planning to write a standalone client application!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

One possibility is to create a standard Java Project, and then add the JMS API JAR file (from your messaging server) to the project.

Another possibility if to create a Java EE | Application Client Project. The project creation wizard has you select an app server and then Eclipse includes that app server's JAR files (which includes the JMS API JAR) in your project. (This works for me in Eclipse 3.4.2, but not in 3.5 - JAR file inclusion seems to be broke in 3.5, either that or one of my plugins is causing a problem.)
 
Consider Paul's rocket mass heater.
 
subject: Which Project To Create For JMS??