|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cuba.wired.WiredClientContext
public class WiredClientContext
Client interface to a wired container used to get access to components and resources provided by that container.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface cuba.ContextI |
---|
ContextI.Type |
Field Summary |
---|
Fields inherited from interface cuba.ClientContextI |
---|
CALLER_PROPERTY |
Constructor Summary | |
---|---|
WiredClientContext()
Like function above with null properties |
|
WiredClientContext(java.util.Properties props)
Creates a WiredClientContext for the default WiredContainer. |
|
WiredClientContext(WiredContainer container)
Creates a WiredClientContext for the passed WiredContainer without any particular configuration parameters. |
|
WiredClientContext(WiredContainer container,
java.util.Properties props)
Creates a WiredClientContext for the passed WiredContainer. |
Method Summary | |
---|---|
java.lang.Object |
getComponent(java.lang.String globalName)
Looks up a component by its global symbolic name. |
javax.sql.DataSource |
getDataSource(java.lang.String globalName)
Looks up an SQL database refered to by a global symbolic name. |
javax.transaction.UserTransaction |
getTransaction()
Provide access to a user transaction |
javax.transaction.TransactionManager |
getTransactionManager()
Returns the TransactionManager of the WiredContainer being
accessed through this client context. |
int |
getType()
Returns the type of context, i.e. |
static void |
setDefaultContainer(WiredContainer newDefault)
Sets the static variable defaultContainer to the given value |
static void |
setDefaultProperties(java.util.Properties props)
Sets the default properties to be used for new WiredClientsContexts when no specific properties are passed in the constructor. |
void |
shutdown()
Shuts down the WiredContainer associated to this client
context in order to release all allocated resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WiredClientContext(WiredContainer container, java.util.Properties props)
props
- Configuration parameters, currently only used
for optional specification of the caller name.public WiredClientContext(WiredContainer container)
public WiredClientContext(java.util.Properties props) throws InitException
props
- Configuration parameters, currently only used
for optional specification of the caller name. If this
parameter is null, the default properties are used instead.
InitException
- if the initialization of the default
container failed.public WiredClientContext() throws InitException
InitException
Method Detail |
---|
public int getType()
getType
in interface ContextI
public java.lang.Object getComponent(java.lang.String globalName) throws ConstructionException, ReferenceException
getComponent
in interface ContextI
globalName
- The global name of the component to look up
ConstructionException
- if the container failed to provide
the required component
ReferenceException
- if the provided symbolic name cannot
be resolved.public javax.transaction.UserTransaction getTransaction() throws javax.transaction.SystemException
ContextI
getTransaction
in interface ContextI
javax.transaction.SystemException
public javax.sql.DataSource getDataSource(java.lang.String globalName) throws ConstructionException, ReferenceException
getDataSource
in interface ContextI
globalName
- The global name of the SQL source to look up
ConstructionException
- if the container failed to provide
the required SQL database
ReferenceException
- if the provided symbolic name cannot
be resolved.public javax.transaction.TransactionManager getTransactionManager()
WiredContainer
being
accessed through this client context. The TransactionManager may e.g.
be required to integrate sophistiacted persistence managers with
the WiredContainer.
public void shutdown()
WiredContainer
associated to this client
context in order to release all allocated resources. This function
should only be called if the client context is no longer used. A
servlet engine e.g. can use this function to close CUBA's connection
pools on application shutdown.
public static void setDefaultContainer(WiredContainer newDefault)
newDefault
- The new Default WiredContainer-Objectpublic static void setDefaultProperties(java.util.Properties props)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |