views:

225

answers:

1

i'm get the following error when deploying my application with a JMS producer and consumer

com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : QueueName

I used the annotations below:

Producer

@Resource(name = "jms/EmailNotificationQueue", mappedName = "EmailNotificationQueue")
private Destination destination;

@Resource(name = "jms/QueueConnectionFactory")
private ConnectionFactory connectionFactory;

I then create the connection and start it before sending the message

Consumer

@MessageDriven(name = "EmailNotificationBean", activationConfig = {                                           
@ActivationConfigProperty(                                  
    propertyName="destinationType",                         
    propertyValue="javax.jms.Queue"),                       
@ActivationConfigProperty(                                  
    propertyName="destinationName",                         
    propertyValue="EmailNotificationQueue"),
@ActivationConfigProperty(
    propertyName="acknowledgeMode",
    propertyValue="CLIENT_ACKNOWLEDGE")

}   
,mappedName = "EmailNotificationQueue"                                                                               
)   
A: 

Have you manually created the Destination?

Log into the admin console, expand Resource, JMS Resources, then Destination Resources. You'll probably need to create a connection factory as well.

Preston
i could create the queue manually, but the spec does not talk about creating manually. Other servers will definitely create the queue on deployment. I saw a lot of people with the same issue, but there doesn't seem to an official solution about it.
n002213f