org.jboss.ejb3.proxy.impl.factory.session.stateful
Class StatefulSessionProxyFactoryBase

java.lang.Object
  extended by org.jboss.ejb3.proxy.impl.factory.ProxyFactoryBase
      extended by org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactoryBase
          extended by org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionProxyFactoryBase
All Implemented Interfaces:
ProxyFactory, SessionProxyFactory, SessionSpecProxyFactory, StatefulSessionProxyFactory
Direct Known Subclasses:
StatefulSessionLocalProxyFactory, StatefulSessionRemoteProxyFactory

public abstract class StatefulSessionProxyFactoryBase
extends SessionProxyFactoryBase
implements StatefulSessionProxyFactory

StatefulSessionProxyFactoryBase Base upon which SFSB Proxy Factories may build

Version:
$Revision: $
Author:
ALR

Constructor Summary
StatefulSessionProxyFactoryBase(String name, String containerName, String containerGuid, org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData metadata, ClassLoader classloader, org.jboss.aop.Advisor advisor)
          Constructor
 
Method Summary
protected  void associateProxyWithSession(Object proxy, Serializable sessionId)
          Associates the specified Proxy with the session denoted by the specified sessionId
 Object createProxyBusiness(Serializable sessionId, String businessInterfaceName)
          Create an EJB3 Business Proxy specific to the specified target business interface name (expressed as a fully-qualified class name)
 Object createProxyBusiness(String businessInterfaceName)
          Create an EJB3 Business Proxy specific to the specified target business interface name (expressed as a fully-qualified class name)
 Object createProxyDefault()
          Create an EJB3 Business proxy with no specific target business interface.
 Object createProxyDefault(Serializable sessionId)
          Create an EJB3 Business proxy with no specific target business interface.
 Object createProxyEjb2x()
          Create an EJB2.x Proxy
 Object createProxyEjb2x(Serializable sessionId)
          Create an EJB2.x Proxy
 Object createProxyHome()
          Create an EJB2.x Home Proxy
 org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory getContainer()
           
protected  Serializable getNewSessionId()
          Creates a new Session on the container and returns the ID representing this newly-created session
protected  Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface)
          Deprecated. http://jira.jboss.com/jira/browse/JBMETA-41
protected  org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory obtainContainer()
          Obtains the Container used by this Proxy Factory
 void setContainer(org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory container)
           
 
Methods inherited from class org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactoryBase
createBusinessDefaultInvocationHandler, createBusinessInterfaceSpecificInvocationHandler, createEjb2xComponentInterfaceInvocationHandler, createHomeInvocationHandler, getBusinessInterfaceTypes, getConstructorProxyDefault, getConstructorProxyEjb2x, getConstructorProxyHome, getConstructorsProxySpecificBusinessInterface, getEjb2xInterfaceType, getHomeType, getMetadata, getReturnTypesFromCreateMethods, setConstructorProxyDefault, setConstructorProxyEjb2x, setConstructorProxyHome, setConstructorsProxySpecificBusinessInterface, setMetadata, start, stop
 
Methods inherited from class org.jboss.ejb3.proxy.impl.factory.ProxyFactoryBase
createProxyConstructor, getAdvisor, getClassLoader, getCommonProxyInterfaces, getContainerGuid, getContainerName, getInterceptors, getInterceptorStackName, getName, setClassLoader, setContainerName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ejb3.proxy.impl.factory.ProxyFactory
getName, start, stop
 

Constructor Detail

StatefulSessionProxyFactoryBase

public StatefulSessionProxyFactoryBase(String name,
                                       String containerName,
                                       String containerGuid,
                                       org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData metadata,
                                       ClassLoader classloader,
                                       org.jboss.aop.Advisor advisor)
Constructor

Parameters:
name - The unique name for this ProxyFactory
containerName - The name of the InvokableContext (container) upon which Proxies will invoke
containerGuid - The globally-unique name of the container
metadata - The metadata representing this SFSB
classloader - The ClassLoader associated with the StatelessContainer for which this ProxyFactory is to generate Proxies
advisor - The Advisor for proxies created by this factory
Method Detail

getReturnTypesFromCreateMethods

@Deprecated
protected Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface)
Deprecated. http://jira.jboss.com/jira/browse/JBMETA-41

Obtains the return types declared by the "create" methods for the specified home interface.

Specified by:
getReturnTypesFromCreateMethods in class SessionProxyFactoryBase
Parameters:
homeInterface -
Returns:

createProxyDefault

public Object createProxyDefault()
Create an EJB3 Business proxy with no specific target business interface. The returned proxy will implement all appropriate business interfaces. Additionally, if the Home interface is bound alongside the Default (same JNDI Name), this Proxy will implement the Home interface as well.

Specified by:
createProxyDefault in interface SessionProxyFactory
Overrides:
createProxyDefault in class SessionProxyFactoryBase
Returns:

createProxyBusiness

public Object createProxyBusiness(String businessInterfaceName)
Create an EJB3 Business Proxy specific to the specified target business interface name (expressed as a fully-qualified class name)

Specified by:
createProxyBusiness in interface SessionSpecProxyFactory
Overrides:
createProxyBusiness in class SessionProxyFactoryBase
Parameters:
businessInterfaceName -
Returns:

createProxyEjb2x

public Object createProxyEjb2x()
Create an EJB2.x Proxy

Specified by:
createProxyEjb2x in interface SessionSpecProxyFactory
Overrides:
createProxyEjb2x in class SessionProxyFactoryBase
Returns:

createProxyHome

public Object createProxyHome()
Create an EJB2.x Home Proxy

Specified by:
createProxyHome in interface SessionSpecProxyFactory
Specified by:
createProxyHome in interface StatefulSessionProxyFactory
Overrides:
createProxyHome in class SessionProxyFactoryBase
Parameters:
sessionId -
Returns:

createProxyDefault

public Object createProxyDefault(Serializable sessionId)
Create an EJB3 Business proxy with no specific target business interface. The returned proxy will implement all appropriate business interfaces. Additionally, if the Home interface is bound alongside the Default (same JNDI Name), this Proxy will implement the Home interface as well.

Specified by:
createProxyDefault in interface StatefulSessionProxyFactory
Parameters:
sessionId -
Returns:

createProxyBusiness

public Object createProxyBusiness(Serializable sessionId,
                                  String businessInterfaceName)
Create an EJB3 Business Proxy specific to the specified target business interface name (expressed as a fully-qualified class name)

Specified by:
createProxyBusiness in interface StatefulSessionProxyFactory
Parameters:
sessionId -
businessInterfaceName -
Returns:

createProxyEjb2x

public Object createProxyEjb2x(Serializable sessionId)
Create an EJB2.x Proxy

Specified by:
createProxyEjb2x in interface StatefulSessionProxyFactory
Parameters:
sessionId -
Returns:

associateProxyWithSession

protected void associateProxyWithSession(Object proxy,
                                         Serializable sessionId)
Associates the specified Proxy with the session denoted by the specified sessionId

Parameters:
proxy -
sessionId -

getNewSessionId

protected Serializable getNewSessionId()
Creates a new Session on the container and returns the ID representing this newly-created session

Returns:
The ID of the new session

obtainContainer

protected org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory obtainContainer()
Obtains the Container used by this Proxy Factory

Returns:
The Container for this Proxy Factory

getContainer

public org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory getContainer()

setContainer

public void setContainer(org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory container)


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.