com.groiss.wf
Class SessionFactory

java.lang.Object
  extended by com.groiss.wf.SessionFactory

public abstract class SessionFactory
extends java.lang.Object

The Session Factory is used to create remote (RMI) or local sessions to @enterprise.


Constructor Summary
SessionFactory()
           
 
Method Summary
static Session createSession()
          Create a session with the default properties.
abstract  Session createSession(java.util.Properties props)
          Create the session, must be implemented by subclass.
static Session createSession(java.lang.String classname, java.util.Properties props)
          Create a session of the given classname and a property list
static void setDefaultFactory(java.lang.String classname, java.util.Properties props)
          Set the default properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionFactory

public SessionFactory()
Method Detail

createSession

public static Session createSession(java.lang.String classname,
                                    java.util.Properties props)
                             throws java.lang.Exception
Create a session of the given classname and a property list

Parameters:
classname - the name of a subclass of SessionFactory
props - the connection properties
Returns:
a session object
Throws:
java.lang.Exception

createSession

public static Session createSession()
                             throws java.lang.Exception
Create a session with the default properties. The default properties are: factory class: com.groiss.avw.LocalSessionFactory, properties: null. They can be set with the method setDefaultFactory(String, Properties)

Throws:
java.lang.Exception

setDefaultFactory

public static void setDefaultFactory(java.lang.String classname,
                                     java.util.Properties props)
Set the default properties.

Parameters:
classname - the name of a subclass of SessionFactory
props - the connection properties

createSession

public abstract Session createSession(java.util.Properties props)
                               throws java.lang.Exception
Create the session, must be implemented by subclass.

Throws:
java.lang.Exception


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.