Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Spring EJB's do not failover automatically

  1. #11
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    Failover in EJB cluster is done on the cluster-aware stub level, not on the client Spring level. The list of servers you defined in your config is used only for jndi-lookup failover, and has nothing to do with failover once the lookup is done.

    Jndi lookup of clustered ejbs will get you a home object that's aware of clustering environment and each remote method invocation will refresh the list of cluster nodes that are available in the cluster at the moment. So - if your ejbs are not configured for clustering, no amount of client-side configuration fiddling will help you.

  2. #12

    Default Spring EJB's do not failover automatically

    Hey, Thanks a ton ! I solved the problem finally . Upgraded to Spring 2.5.5 and used jee-jndi lookup .

  3. #13
    Join Date
    Jun 2008
    Posts
    2

    Default

    Could you explain in detail how your problem was resolved? I am running into a similar problem but have not upgraded to 2.5.1.

  4. #14

    Default EJB's do not failover automatically

    Hi,
    I had a set of EJB's on the server side and used Spring to look up the EJB's from the client side. The problem was if the stub was being downloaded from one m/c, automatic failover to another m/c would not happen even though Spring had all the addresses. The problem is the JNDITargetFactorybean is a simple bean which does a simple JNDI look up. Also, the EJB's should be clustered.

  5. #15

    Default configuring the reconnect time on failover

    Hi,
    I am using the jee-jndi tag foe failover between servers as following:
    Code:
    <jee:jndi-lookup id="sampleBean"
                 jndi-name="ejb/sampleBean/remote"
                 cache="true"
                 resource-ref="true"
                 lookup-on-startup="true"
                 expected-type="com.sampleBean">
                 <jee:environment>
        	java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
         	java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
           	java.naming.provider.url=jnp://3.62.33.24:1099, jnp://3.45.23.23:1099
        </jee:environment>
      </jee:jndi-lookup>
    The time for failover between two servers is quite high. Even though the failover happens eventually. Is there some way , I can configure the time for failover ? Somewhere the minimum. maximum or the default is specified ?

    Thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •