"[EMAIL PROTECTED]" wrote : Yes, you can, but not all Seam contexts will be
available.
Can you give an example that shows how to use this?
I tried to call Contexts.getSessionContext() or
Component.getInstance("mySeamComponent", false) from within my MDB but both
methods return null. Anotating the MDB into a Seam component also doesn't help.
I used the latest nightly build.
| /*
| [EMAIL PROTECTED]("myMDB")
| [EMAIL PROTECTED](SeamInterceptor.class)
| [EMAIL PROTECTED](ScopeType.STATELESS)
| */
| @MessageDriven(activationConfig =
| {
| @ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Queue"),
| @ActivationConfigProperty(propertyName="destination",
propertyValue="queue/testJms")
| })
| public class MyMDB implements MessageListener {
| ...
| @In private Context statelessContext;
| private Context sessionContext;
|
| public void onMessage(Message msg) {
| sessionContext = Contexts.getSessionContext();
| log.info("StatelessContext = " + statelessContext); //returns
null
| log.info("SessionContext = " + sessionContext); //returns null
| }
|
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935111#3935111
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935111
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user