i need to implement this scenario Brief about that is
have two java based web application hosted on two different tomcat instances say T1 and T2. when ever there is content change on T2
i want to put content name and date modified in queue on which T1 is listening. As soon as T2 put it queue , T1 should log these
fields in databse table which three columns i.e prim key, ContentName and Modified date.? I am not getting how to start implementing
JMS here as i am laymen to JMS? I just know JMS makes use of queue on which probably one application will be publisher and other will consumer.
Any help how to start on this would be immense favour? I am using tomcat for both application. On different sites on net there is two much material that it gets confused (Actually i have short time to implement this :()
i need to implement this scenario Brief about that is have two java based
Share
Calm down and start reading. There are a few short tutorials that don’t go to extreme lengths to explain the theory before getting to runnable code. This is not a bad one: http://java.sun.com/developer/technicalArticles/Ecommerce/jms/
Basically you obtain a connection factory from somewhere. (It could be by a JNDI lookup or you could create it directly.) You ask the factory to create a connection, the connection to create a session, and the rest comes from the session.
To send a message you might use something like:
To receive a message you might use something like: