org.jboss.ejb3.endpoint
Interface SessionFactory


public interface SessionFactory

Create sessions on an EJB. Usually this would be a stateful session bean.

Version:
$Revision: $
Author:
Carlo de Wolf

Method Summary
 java.io.Serializable createSession(java.lang.Class<?>[] initTypes, java.lang.Object[] initValues)
          Create a session on an EJB.
 void destroySession(java.io.Serializable session)
          Destroy a session on an EJB.
 

Method Detail

createSession

java.io.Serializable createSession(java.lang.Class<?>[] initTypes,
                                   java.lang.Object[] initValues)
Create a session on an EJB. Under the hood, the EJB's construct will be called. Followed by injection, calling the post-construct method and finally calling the appropriate init method.

Parameters:
initTypes - the argument types for the init method or null if its a EJB3 view
initValues - the arguments for the init method or null if its a EJB3 view
Returns:
the session created.

destroySession

void destroySession(java.io.Serializable session)
Destroy a session on an EJB. Invokes the pre-destroy on the EJB and destroys it.

Parameters:
session - the session to destroy.


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