dev@glassfish.java.net

Re: Glassfish and JNDI names for MDBs

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Fri, 19 Oct 2007 16:37:33 +0530

Hi Peter

Apologies for the delay.

> MDB00017: [AltOneMDBBean]: Exception in creating message-driven bean
> container: [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS
> resource not created : ]

...

> Is there a way to discover the JMS resource name that Glassfish was
> looking for? The error message is of no use in this respect.

The error actually includes the JMS destination jndi name being looked up by the
runtime. It is "empty".

> Does this mean the server does not automatically assign default JNDI
> names for JavaEE5 MDBs? Should it have? (Since an external resource is
> involved, I can certainly see issues with doing so.)

Since the mappedName has not been specified as part of the messagedriven
annotation, the JNDI name of the JMS resource to be used by the container (to
identify the JMS destination to listen from) is "empty" and hence the cryptic
error message. AFAIK, no default JNDI names for the destination are created.
Ken/Mahesh: could you clarify?

I agree that the error message can be corrected to be made more usable. I shall
file a glassfish issue for this.

Thanks
--Siva.



Peter Williams wrote:
> I have an ear with a mis-configured MDB and, as expected, on deployment,
> the deploy fails with the message:
>
> MDB00017: [AltOneMDBBean]: Exception in creating message-driven bean
> container: [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS
> resource not created : ]
> com.sun.enterprise.connectors.ConnectorRuntimeException
> com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource
> not created :
> at
> com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:1528)
>
> at
> com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1379)
>
> at
> com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:170)
>
> ...
>
> Is there a way to discover the JMS resource name that Glassfish was
> looking for? The error message is of no use in this respect.
>
> Furthermore, for this app, the MDB did not specify either mapped-name in
> the annotation or a jndi-name in sun-ejb-jar.xml. I was attempting to
> discover what the automatically assigned JNDI name, if any, would be.
> Even though the deploy failed, the server did write out
> metadata-complete descriptor files and the sun-ejb-jar.xml computed by
> the server does not assign a JNDI name for this MDB.
>
> Does this mean the server does not automatically assign default JNDI
> names for JavaEE5 MDBs? Should it have? (Since an external resource is
> involved, I can certainly see issues with doing so.)
>
> -Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>