2 Replies Latest reply on Oct 20, 2008 11:59 AM by Graeme Harnish

    automatically reconnecting to LDAP-server using MBean Extern

    Marc Lustig Newbie

      We get an exception after not using the JNDI-connection for a few minutes:

      javax.naming.CommunicationException: connection closed [Root exception is java.io.IOException: connection closed];
      


      How can I instruct the MBean to reconnect automatically?
       <mbean code="org.jboss.naming.ExternalContext"
       name="jboss.jndi:service=ExternalContext,jndiName=external/ldap/swm">
       <attribute name="JndiName">external/ldap/swm</attribute>
       <attribute name="Properties">
       java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
       java.naming.provider.url=ldap://svmetaprod01:389/o=SWM
       java.naming.security.principal=cn=ReadOnlyAdmin,o=swm
       java.naming.security.authentication=simple
       java.naming.security.credentials=Ca024334
       com.sun.jndi.ldap.connect.timeout=5000
       </attribute>
       <attribute name="InitialContext">javax.naming.ldap.InitialLdapContext</attribute>
       <attribute name="RemoteAccess">false</attribute>
       </mbean>