If you do not want to go down the JEE route, try Hazelcast. I have had good 
experiences with it in the past.
Apart from shared maps, it also provides topics and queues like JMS.

The most basic setup can look like this:

public HazelcastInstance buildHazelcastInstance() {
    final Config cfg = new InMemoryXmlConfig("<hazelcast></hazelcast>");
    cfg.setProperty("hazelcast.logging.type", "slf4j");
    cfg.setProperty("hazelcast.rest.enabled", "false");
                
    return Hazelcast.init(cfg);
}

If clustering is not needed or you think this dependency is way too huge, try 
building something on top of google-guava's event bus: 
http://docs.guava-libraries.googlecode.com/git-history/v12.0/javadoc/com/google/common/eventbus/package-summary.html

cheers,
andi.

On Jun 13, 2012, at 16:37 , Dmitry Gusev wrote:

> You need Java EE if you want to use Java Message Service, or you can use
> Apache TomEE which implements JMS (http://tomee.apache.org/tomcat-jms.html)
> -- I haven't used TomEE though.
> 
> Or you can implement your own queue (based on ArrayBlockingQueue, for
> instance) with consumer thread(s) which you should start manually.
> 
> Both approaches have their pros and cons, though.
> 
> On Wed, Jun 13, 2012 at 6:04 PM, Angelo C. <angelochen...@gmail.com> wrote:
> 
>> no, i don't need the response from the method, MS/JMS is new to me, can it
>> be
>> used even I 'm not using Java EE?
>> 
>> 
>> Dmitry Gusev wrote
>>> 
>>> Do you plan to consume method's response in the same request?
>>> 
>>> If not, some sort of MQ/JMS may be an option--just put your message there
>>> and return.
>>> The message itself will be processed in separate thread with MQ handler
>>> (Message-Driven Bean in case of Java EE).
>>> 
>>> Dmitry Gusev
>>> 
>>> AnjLab Team
>>> http://anjlab.com
>>> 
>> 
>> 
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/non-blocking-code-in-T5-tp5713836p5713841.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> 
> -- 
> Dmitry Gusev
> 
> AnjLab Team
> http://anjlab.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to