[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-1375) Clustered SFSB creation not properly load balanced

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Tue May 20 13:43:59 EDT 2008


Clustered SFSB creation not properly load balanced
--------------------------------------------------

                 Key: EJBTHREE-1375
                 URL: http://jira.jboss.com/jira/browse/EJBTHREE-1375
             Project: EJB 3.0
          Issue Type: Bug
          Components: Clustering, proxy
    Affects Versions: AS 5.0.0.Beta4
            Reporter: Brian Stansberry
         Assigned To: Brian Stansberry
            Priority: Critical
             Fix For: AS 5.0.0.CR1


The logic for load balancing SFSBs depends on the fact that a bean context is not created until the first invocation on the proxy.  The proxy uses FirstAvailable (by default) and that first invocation picks a random target.  Until recent changes, that first invocation would create the server-side bean context.  Thereafter FA ensures all subsequent invocations go to that same server, where the bean context resides.

Following recent changes in EJB3, now the SFSB bean context is created early, at the same time as the proxy.  This breaks the existing setup in 2 ways:

1) The load balance policy in the proxy knows nothing about where it came from. For the first invocation it will pick a random target, which is not likely to be where the bean resides, forcing a cross-cluster failover of the context when the request arrives server side.

2) The invocation from the client-side proxy factory proxy to the server-side proxy factory is not load balanced.  The invocation will go to whatever server the client did the JNDI lookup on.  If those JNDI lookups aren't load balanced, the session creation won't be either.

To solve these issues:

1) The proxy to the proxy factory needs to be load balanced. 
2) Need to find a way to communicate the initial target to the load balance policy.  Probably by default SFSBs use a special load balance policy that can examine the AOP invocation for metadata.  Tricky part is getting the proper target into the proxy so it can add it to the metadata.  The proxy factory doesn't really know how to identify what "target" is associated with the current node; a "target" is an opaque object.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list