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?
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.
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.)