uCosminexus Application Server, Expansion Guide
You can use the Java EE functionality in processes that are executed as the asynchronous parallel processing. APIs of TimerManager and WorkManager, which can use the Java EE functionality, are as follows:
For details on APIs, see API specifications for Timer and Work Manager for Application Servers.
The following table describes the Java EE functionality that you can use in TimerManager and WorkManager.
Table 10-2 Java EE functionality that you can use in TimerManager and WorkManager
| Functionality | Usage status | Reference location |
|---|---|---|
| Invoking Enterprise Bean | N | -- |
| Naming Service | Y# | (1) |
| Transaction service and resource connections | Y# | (2) |
| Log and trace output | Y | (3) |
| Using container extension library | Y | (4) |
| Method cancellation | N | -- |
The following subsections classify and describe the functionality that you can use with TimerManager and WorkManager. The subsections also describe the points to be considered when using the functionality.
The following table describes whether the functionality provided as Naming Service can be used with TimerManager and WorkManager.
Table 10-3 Usage status of Naming Service functionality
| Functionality | Usage status |
|---|---|
| Lookup of DB Connector by using JNDI | Y |
| Lookup of Java Mail by using JNDI | N |
| Lookup of JavaBeans resource by using JNDI | N |
| Lookup of EntityManager by using JNDI | N |
| Lookup of EntityManagerFactory by using JNDI | N |
| Lookup of TimerManager by using JNDI | N#1 |
| Lookup of WorkManager by using JNDI | N#1 |
| Lookup of user transaction by using JNDI | Y#2 |
#1: You cannot invoke TimerManager or WorkManager by extending the schedule of TimerManager or WorkManager.
#2: If the schedule source is an EJB that manages transactions in CMT, you cannot perform a lookup with java:comp/UserTransaction. Make sure to perform a lookup by using HITACHI_EJB/SERVERS/J2EE-server-name/SERVICES/UserTransaction.
You can only use DB Connectors for resource adapters. The following table describes the DB Connectors that you can use with TimerManager and WorkManager.
Table 10-4 Usage status of DB Connectors
| DB Connector name | Usage status |
|---|---|
| DBConnector_HiRDB_Type4_CP.rar | Y |
| DBConnector_HiRDB_Type4_XA.rar | Y |
| DBConnector_Oracle_CP.rar | Y |
| DBConnector_Oracle_XA.rar | Y |
| DBConnector_HiRDB_Type4_CP_Cosminexus_RM.rar | N |
| DBConnector_HiRDB_Type4_XA_Cosminexus_RM.rar | N |
| DBConnector_Oracle_CP_Cosminexus_RM.rar | N |
| DBConnector_Oracle_XA_Cosminexus_RM.rar | N |
| DBConnector_CP_ClusterPool_Root.rar | N |
| DBConnector_Oracle_CP_ClusterPool_Member.rar | N |
When using a DB Connector, specify NoTransaction, LocalTransaction, or XATransaction for the transaction support level. You must specify an optional name of a DB Connector to acquire the connection of the DB Connector. With a lookup by JNDI, use the specified optional name and acquire the connection of the DB Connector. For details on how to acquire the connection by using the optional name of the DB Connector, see 2.6 Assigning an optional name to Enterprise Bean or the J2EE Server (user-specified name space functionality) in the uCosminexus Application Server Common Container Functionality Guide.
The following table describes whether the functionality provided as a resource connection and transaction service can be used in TimerManager and WorkManager.
Table 10-5 Usage status of the transaction service functionality
| Functionality | Usage status | |
|---|---|---|
| Transaction (user transaction) |
Local transaction | Y |
| Global transaction | Y | |
| Automatic conclusion of transaction#1 | ||
| Transaction timeout | Y | |
| Connection pooling | Connection pooling by using DB Connector | Y |
| Warm-up of connection pool | Y | |
| Adjusting number of connections | Y | |
| Connection sharing#2 | ||
| Connection association | N | |
| Statement pooling of DB Connector | Y | |
| Detecting connection faults | Y | |
| Waiting for acquiring connections when connections are exhausted | Y | |
| Retrying acquisition of connections | Y | |
| Automatically closing connections | N | |
| Connection sweeper | Y | |
| Output of SQL for examining faults | Y | |
#1: You must conclude the user transaction before returning from the Listener processing method. Otherwise, the transaction is rolled back even when an exception does not occur, and the message (KDJE43179-W) is output.
#2: The range of connections that you can share is only the same transaction, which is set by default.
The following table describes whether the functionality that outputs logs and traces can be used in TimerManager and WorkManager.
Table 10-6 Usage status of the log and trace functionality
| Functionality | Usage status |
|---|---|
| User log | Y |
| Performance analysis trace | Y |
You can use the same container extension library as in the case when TimerManager and WorkManager are not used.
All Rights Reserved. Copyright (C) 2013, 2015, Hitachi, Ltd.