[jboss-user] [JNDI/Naming/Network] - automatically reconnecting to LDAP-server using MBean Extern

axismundi do-not-reply at jboss.com
Mon Oct 22 08:49:50 EDT 2007


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>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097455#4097455

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097455



More information about the jboss-user mailing list