Check the documentation on WLS6.0 at
http://edocs.bea.com/wls/docs60/ejb/message_beans.html#1055232 and you'll
see the following:
<message-driven-destination>
<jms-destination-type>
javax.jms.Topic
</jms-destination-type>
</message-driven-destination>
yet, EJB2.0 spec clearly defines that JMS destination should be in
<destination-type> tag, as described in
http://java.sun.com/dtd/ejb-jar_2_0.dtd.
Typo? I wish! If I use the latter, my WLS6.0SP2 refuses to load my MDB,
giving the following exception:
<Apr 24, 2002 10:26:32 PM EDT> <Error> <J2EE> <Error deploying EJB Component
: n2pMsgBean
weblogic.ejb20.EJBDeploymentException: Failed to parse
D:\bea\wls60\.\config\mydomain\applicati
ons\.wl_temp_do_not_delete\wl_local_comp59804.jar; nested exception is:
weblogic.xml.process.XMLParsingException: Element type
"destination-type" must be decla
red. - with nested exception:
[org.xml.sax.SAXParseException: Element type "destination-type" must be
declared.] Line: 12 Col
umn: 27
org.xml.sax.SAXParseException: Element type "destination-type" must be
declared.
at
weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
What's going on ??? Am I the only one here having this problem?
-Alan
My ejb-jar.xml:
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>N2pMsgBean</ejb-name>
<ejb-class>com.n2pb.ejb.N2pMsgBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<jms-destination-type>javax.jms.Topic</jms-destination-type>
<!-- this works! -->
<subscription-durability>durable</subscription-durability>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>N2pMsgBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Bill