users@glassfish.java.net

Re: JMS Using Spring

From: Sahoo <Sahoo_at_Sun.COM>
Date: Tue, 20 Apr 2010 21:08:59 +0530

I am not sure what your use case is. Where do you package that MDB? Is
it part of an OSGi bundle or a plain EJB jar? If your MDB is part of a
plain EJB jar, then the code below is sufficient - there is no need for
any sun-ejb-jar.xml or any XML file. I guess you are packaging the MDB
as part of an OSGi bundle, correct? The support for EJBs in an OSGi
bundle is available in GlassFish trunk (i.e., 3.1-SNAPSHOT) builds. Are
you using v3 or v3.1-SNAPSHOT? If former is the case, you need to deploy
your ejb-jar as a normal ejb jar by running "asadmin deploy mymdb.jar."
If you are using 3.1-SNAPSHOT, then let me know. I can point to an
example that shows how to make MDBs part of OSGi bundles.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> Sahoo,
>
> No, I don't care how I can get it done, as long as it works. I also tried the following:
>
> @MessageDriven(mappedName="jmsTopic")
> public class MsgConsumer implements MessageListener
> {
> public void onMessage(Message message)
> {
> TextMessage msg = (TextMessage) message;
> ...
> }
> }
>
> but that did nothing. With these annotations, I'm not familiar with what needs to be put in the sun-ejb-jar.xml file (or whatever the config file should be) and where it needs to be in an OSGI bundle. I know with all the Spring config files, we just throw them in META-INF/spring and they get scanned.
>
> If we don't need all the CachingFactory and JNDIEnvironment stuff, that's fine. I would like to streamline the code as much as possible.
> [Message sent by forum member 'ltouve']
>
> http://forums.java.net/jive/thread.jspa?messageID=398002
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>