76 views
Skip to first unread message

Gavin Zhang

unread,
Jan 12, 2012, 4:26:26 AM1/12/12
to glassfi...@googlegroups.com
我想在glassfish里部署一个jms mdb,出错信息提示:

Exception while loading the app : EJB Container initialization error com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Error in Runtime DD: missing destination JNDI name at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1855) at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:186) at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:205) at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:121) at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:230) at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290) at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101) at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:257) at

其中我的MDB注释如下:
@MessageDriven(name = "My-JMS-MDB",
messageListenerInterface = MessageListener.class,
activationConfig = {
  @ActivationConfigProperty(propertyName = "DestinationJndiName", propertyValue = "jms/MyQueue"),
  @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
  @ActivationConfigProperty(propertyName = "DestinationType", propertyValue = "javax.jms.Queue")})
public class MyJMSMDB {

而ejb-jar.xml和glassfish-ejb-jar.xml内容如下:
<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar xmlns = "http://java.sun.com/xml/ns/javaee"
         version = "3.1"
         xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
  <enterprise-beans>
    <message-driven>
      <ejb-name>My-JMS-MDB</ejb-name>
      <message-destination-link>MyLogicalQueue</message-destination-link>
    </message-driven>
  </enterprise-beans>
  <assembly-descriptor>
    <message-destination>
      <message-destination-name>MyLogicalQueue</message-destination-name>
      <lookup-name>jms/MyQueue</lookup-name>
    </message-destination>
  </assembly-descriptor>
</ejb-jar>

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-jar>
  <enterprise-beans>
    <ejb>
      <ejb-name>My-Simple-JMS-MDB</ejb-name>
      <jndi-name>jms/MyQueue</jndi-name>
    </ejb>
<!--    <message-destination>
      <message-destination-name>MyLogicalQueue</message-destination-name>
      <jndi-name>jms/MyQueue</jndi-name>
    </message-destination>-->

  </enterprise-beans>
</glassfish-ejb-jar>

以上指定message destination的方式都是抛出这种错误,只有我在@MessageDriven(mapped-name="jms/MyQueue"做设置时才能正确运行。

请问是我哪里配置的不对吗?


Thanks

Gavin Zhang

unread,
Jan 13, 2012, 12:59:00 AM1/13/12
to glassfi...@googlegroups.com
这里还有玩glassfish的吗?


Thanks

Gavin.Zhang @ Beijing


2012/1/12 Gavin Zhang <guangqu...@gmail.com>

Hantsy Bai

unread,
Jan 13, 2012, 1:03:11 AM1/13/12
to glassfi...@googlegroups.com
Google Group以前都被封了,现在估计少人用了。
Reply all
Reply to author
Forward
0 new messages