Hello,
I have a MDB and I want to Inject an object into it to perform some tasks.
When I run this in a test via openejb.embedded the CDI object is null. Is
this functionality supported in OpenEJB?
OpenEJB version 4.0.0-beta-1
@MessageDriven(
mappedName = "jms/DataMigrationQueue",
messageListenerInterface=MessageListener.class,
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationName",
propertyValue = "jms/DataMigrationQueue"),
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "messageSelector",
propertyValue = "catalog = 'xxx' and table = 'xxx'")
})
public class MigrationMessageListener implements MessageListener
{
@Inject
private MigrationService migrationService;
@Override
public void onMessage(Message message)
{
System.out.println(migrationService);
}
}
Thank You,
-kurt
--
View this message in context:
http://openejb.979440.n4.nabble.com/Inject-CDI-Objects-into-MDB-s-tp4018481p4018481.html
Sent from the OpenEJB User mailing list archive at Nabble.com.