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
 Serializable createSession(Class<?>[] initTypes, Object[] initValues)
          Create a session on an EJB.
 void destroySession(Serializable session)
          Destroy a session on an EJB.
 

Method Detail

createSession

Serializable createSession(Class<?>[] initTypes,
                           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(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 © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.