users@glassfish.java.net

Configure Message Driven Bean on glassfish v2 to use ConnectionFactory LDAP

From: <glassfish_at_javadesktop.org>
Date: Thu, 06 Sep 2007 09:57:09 PDT

I am trying to configure message Driven Bean to use ConnectionFactory from a LDAP server.
I have setup an External JNDI name at "Resources> JNDI> External Resources", and following is the extract from the domain.xml

    <external-jndi-resource enabled="true" factory-class="com.sun.jndi.ldap.LdapCtxFactory" jndi-lookup-name="cn=RVNG_QCF2,ou=Dev,ou=JMS,ou=Services,o=Pegasus Systems" jndi-name="jms/LdapConnectionFactory" object-type="user" res-type="javax.jms.ConnectionFactory">
      <property name="java.naming.security.authentication" value="none"/>
      <property name="java.naming.provider.url" value="ldap://linuxdev2.pegs.com:389"/>
    </external-jndi-resource>

I am able to do a lookup by using the following code from a servlet:

 Context context = new InitialContext();
 connectionFactory = (ConnectionFactory) context.lookup("jms/LdapConnectionFactory");

but when i try to configure the MDB with this as connectionfactory i get the following error.

com.sun.enterprise.connectors.ConnectorRuntimeException: MDB connection factory not created for : jms/LdapConnectionFactory

I am attaching the full stack trace also.


Question:
Can we configure glassfish v2 so that MDB can use LDAP Connectionfactoy ?
if yes then how do we make the MessageDrivenBean use the External resource JNDI name as ConnectionFactory ?
[Message sent by forum member 'singhrvijay2007' (singhrvijay2007)]

http://forums.java.net/jive/thread.jspa?messageID=234243