I am getting the following error:
Application EBS_Calc#EBS_Calc_EJB.jar#MBIntegrations has an , useJNDI, for which there is no corresponding property on the ActivationSpec class jms/ASQueue(com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivationSpecImpl) of ResourceAdapter cells/USWSA0102235Node01Cell/nodes/USWSA0102235Node01/servers/server1/resources.xml#J2CResourceAdapter_1364909976437. This property will be ignored. This may have undesirable effects.
ActivationSpe W J2CA0161W: The type of the object referred to by the supplied destination JNDI name is wrong. The object must implement javax.jms.destination. The destination JNDI name was: jms/ASQueue. The supplied objects class was: {1}
ActivationSpe E J2CA0137E: The ActivationSpec validate() method failed with an InvalidPropertyException. The ActivationSpec is jms/ASQueue (com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivationSpecImpl), which belongs to the installed ResourceAdapter cells/USWSA0102235Node01Cell/nodes/USWSA0102235Node01/servers/server1/resources.xml#J2CResourceAdapter_1364909976437 and is associated with the MDB application EBS_Calc#EBS_Calc_EJB.jar#MBIntegrations. See the following list of failed properties along with their values:
destination null
destination null
...
CWSJR1181E: The JMS activation specification has invalid values - the reason(s) for failing to validate the JMS activation specification are: [CWSJR1188E: The destination on a JMS activation specification must be given a value, CWSJR1192E: JMS activation specs using a destination type of queue must have a destination of type [com.ibm.websphere.sib.api.jms.JmsQueue] but the destination passed was of type [null]]
I have configured accordingly the queue and bus and destination in websphere
My java code looks as follows:
@MessageDriven(mappedName = "jms/ASQueue", activationConfig = {
@ActivationConfigProperty(propertyName = "connectionFactoryJndiName", propertyValue = "jms/CalcConnectionFactory"),
@ActivationConfigProperty(propertyName = "destinationName", propertyValue = "jms/calcInQueue"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })
@Resources ({
@Resource(name="jms/CalcConnectionFactory",
mappedName="jms/CalcConnectionFactory", // External JNDI name
type=javax.jms.ConnectionFactory.class)
})
public class MBIntegrations implements MessageListener {
private static final String CONNECTION_FACTORY_NAME = "jms/CalcConnectionFactory";
private static final String DESTINATION_NAME = "jms/calcInQueue";
@Resource
private MessageDrivenContext mdc;
private static final Logger logger = Logger.getLogger(MBIntegrations.class);
public void onMessage(Message inMessage) {
TextMessage msg = null;
try {
if (inMessage instanceof TextMessage) {
msg = (TextMessage) inMessage;
logger.info("MESSAGE BEAN: Message received: " + msg.getText());
} else {
logger.warn("Message of wrong type: "
+ inMessage.getClass().getName());
}
} catch (JMSException e) {
e.printStackTrace();
mdc.setRollbackOnly();
} catch (Throwable te) {
te.printStackTrace();
}
}
}
and IBM binder
<message-driven name="MBIntegrations">
<jca-adapter activation-spec-binding-name="jms/ASQueue"
destination-binding-name="jms/ASQueue" />
<resource-ref name="jms/CalcConnectionFactory"
binding-name="jms/CalcConnectionFactory" />
<resource-ref name="jdbc/OracleDS" binding-name="jdbc/ORACLE" />
</message-driven>
I am not sure what I am doing wrong, could someone help?