Never mind, I think I can solve this by implementing the MessageListener 
interface in a class within the bundle, and passing it all the connection 
information at instantiation time. Each time the ManagedServiceFactory creates 
an instance of the service Class, it will create a new listener instance.

Larry


> -----Original Message-----
> From: Larry Touve
> Sent: Tuesday, April 27, 2010 7:09 AM
> To: [email protected]
> Subject: Using ManagedServiceFactory to create MDBs?
> 
> Hi,
> 
>   Is it possible to use a ManagedServiceFactory to create instances of a
> service that would contain a Message Driven Bean?
> 
>  Our system needs to dynamically create services, and each service needs
> to subscribe to a Topic to get processing information.  The MSF pattern
> seems to be the best way to create the services (which all need to be
> distinct instances), but I'm not sure how it would work with an
> annotated MDB class in the service's bundle.  One solution would be to
> have a single MDB that implements BundleListener so it knows what
> services have been created, then can forward the messages to the
> bundles, but I would prefer to have the services subscribe to the Topic.
> 
> Thanks,
> larry
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.814 / Virus Database: 271.1.1/2837 - Release Date: 04/26/10
> 14:27:00

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to