Hi! I have a small problem, I don't know if I have truly understood the
concept of using jms/with say richfaces a4j push component. Second problem is
that I don't know where to post this kind of question. I hope this is the
right place to get some feedback/pointers. I have a an application which has
two kinds of topic publications: first is available to every logged in user.
This works nicely. Every logged in user gets notified about an event that
occur on my businesstier. Second publication is the problematic one, supposed
to be notified to only one specific user. For example if we have 3 logged in
users A, B , C only A gets the notification. As I have understood, I should
be using subtopics somehow?? So far this scheme consists of two different
parts: topic publishing, which takes place at my businesstier and topic
subscribing which takes place at my web-tier. I don't have any message driven
beans in use neither do I have a bean class which'd implement MessageListener
interface. BusinessTier ------------- Topics initialization: ... try { tcf =
(TopicConnectionFactory) InitialContext.
doLookup("jms/KlubiConnectionFactory"); connection =
tcf.createTopicConnection(); session = connection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE); topic = InitialContext.doLookup("/topic/Klubi2");
publisher = session.createPublisher(topic); } catch (JMSException e) { throw
new RuntimeException(e); } ... Publishing topic: this.callInfo = new
KlubiCallInfo(service, msisdn, answerToCall, callId, state, channel);
ObjectMessage objMessage = session.createObjectMessage(this.callInfo);
publisher.publish(objMessage); finalize(); //finalize method implemented,
left out just for space :) Topic subscribing: .xhtml ------- Bean class
---------- ... this.host.setUid(Utility.generateRandomUid().replaceAll("-",
"")); topicsContext = TopicsContext.lookup();
topicsContext.getOrCreateTopic(new TopicKey("Klubi2", this.host.getUid()));
... Relevant settings to glassfish have been set and web.xml is in order Any
feedback is appreciated. Timo
--
[Message sent by forum member 'tvaana']
View Post: http://forums.java.net/node/891194