com.ibm.websphere.batch.ilc
Class ILContainerFactory
- java.lang.Object
-
- com.ibm.websphere.batch.ilc.ILContainerFactory
-
public class ILContainerFactory extends java.lang.Object
ILContainerFactory creates ILContainer instance to use for executing native language procedures inside the WAS z/OS environment.
-
-
Constructor Summary
Constructors Constructor and Description ILContainerFactory()
-
Method Summary
Methods Modifier and Type Method and Description static void
clearContainerFromThread()
Destroys the existing ILContainer being used.ILContainer
create()
Creates an ILContainer instance.ILContainer
create(java.sql.Connection db2Connection)
Creates an ILContainer instance that uses the specified DB2 connection.protected static com.ibm.ws.batch.ilc.impl.ILContainerImpl
getContainerFromThread()
static ILContainerFactory
getFactory()
Returns the factory instance singleton for use in creating ILContainers objects.protected static void
setContainerOnThread(com.ibm.ws.batch.ilc.impl.ILContainerImpl container)
-
-
-
Method Detail
-
setContainerOnThread
protected static void setContainerOnThread(com.ibm.ws.batch.ilc.impl.ILContainerImpl container)
-
getContainerFromThread
protected static com.ibm.ws.batch.ilc.impl.ILContainerImpl getContainerFromThread()
-
clearContainerFromThread
public static void clearContainerFromThread() throws ILContainerException
Destroys the existing ILContainer being used. This operation is typically handled by the Batch runtime at the end of a job step. It is recommended not to call this from your batch application code unless you are encountering a condition where your current container instance is in an unusable state.- Throws:
ILContainerException
-
getFactory
public static ILContainerFactory getFactory()
Returns the factory instance singleton for use in creating ILContainers objects.- Returns:
- the factory instance singleton.
-
create
public ILContainer create() throws ILContainerException
Creates an ILContainer instance. If an instance already exists on thread, it is returned with promise from ILContainer runtime that the returned ILContainer belongs to the current execution scope. An execution scope is a batch job step or a remote component invocation (e.g. EJB, servlet).- Returns:
- an ILContainer instance.
- Throws:
ILContainerException
- if the ILContainer creation fails.
-
create
public ILContainer create(java.sql.Connection db2Connection) throws ILContainerException
Creates an ILContainer instance that uses the specified DB2 connection. If an instance already exists on thread, it is returned with promise from ILContainer runtime that the returned ILContainer belongs to the current execution scope. An execution scope is a batch job step or a remote component invocation (e.g. EJB, servlet).- Returns:
- an ILContainer instance.
- Throws:
ILContainerException
- if the ILContainer creation fails.
-
-