hi!

if I've wanted to execute multiple EJB beans' business
methods in parallel as JMS consumer(s), what is the
recommended way to do this in JRun?

a) does rewriting jrun sample sample6b's TopicBean's method:

  public void onDispatching(final Message message) throws JMSException {
    
    messages.add(message);
    
    while (messages.size() > 100) {
      messages.remove(0);
    }
    
    InstanceManager.setDirty(true);
  }

to look like instead:

  public void onDispatching(final Message message) throws JMSException {
    
  Method theMethod = SomeTargetClass.class.getMethod("someBusinessMethod", new Class[] 
{foo.class});
  _callerId = ResourceManager.createAutoCaller(targetBeanRef,
                                               theMethod,
                                               new Object[] {foo_arg},
                                               1   // interval;one-shot, cancelled 
after 1st execution
                                               );

   // the message is never stored - discard immediately.   
    InstanceManager.setDirty(true);  // but do setDirty() anyway; maybe for safety(?)
  }

will do the job?? (or cause any *serious* problems?)

;; how can I control the parallelism of tasks executed under
;; the control of createAutoCaller() - if possible??


b) does using properly the JMS's ServerSessionPool also work in case of JRun?

http://java.sun.com/products/jms/javadoc-102a/javax/jms/ServerSessionPool.html

(maybe like this?? :p):
http://www.weblogic.com/docs45/classdocs/weblogic.jms.ServerSessionPoolFactory.html

regards,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to