Thursday, December 4, 2008

J2EE 1.4 JMS problems using java.sun.com JMS tutorial

Apparently Sun's JMS tutorial has not been updated to work with J2EE 1.4 and thus most of the commands they tell you to do simply do not work. This is because there's been a lot of changes to the names of J2EE commands that you type at the command prompt.


Here are some guidelines:
  • When you download J2EE 1.4, just use their default installation directory. Do not install in a directory that has spaces in its path (ie. "Program Files\..." if you use Windows) as Java has trouble finding directories with spaces in them when you set "classpath" etc.
  • Starting the J2EE server was a problem because my system simply could not find the progam called: "j2ee". In J2EE 1.4, this program has been renamed to "asadmin" 
    • Start J2EE server in version 1.3, type: j2ee
    • Start J2EE server in version 1.4, type: asadmin start-domain
  • Adding a JMS destination queue is also different in J2EE 1.4
    • Add JMS destination queue in version 1.3, type: j2eeadmin -addJmsDestination MyQueue queue
    • Start J2EE server in version 1.4, type: asadmin create-jmsdest -T queue MyQueue
  • To view a list of JMS destinations is different in J2EE 1.4
    • View JMS destination list in version 1.3, type: j2eeadmin -listJmsDestination
    • Start J2EE server in version 1.4, type: asadmin list-jmsdest

No comments: