Hitachi

uCosminexus Application Server Compatibility Guide


21.2.3 Compatibility with Timer and Work Manager for Application Servers

The specifications stated as vendor dependent in Timer and Work Manager for Application Servers Specifications are not supported by Application Server. Also, the specifications of APIs provided by CommonJ and APIs provided by Application Server are different. This section describes both the Timer for Application Server specifications and Work Manager for Application Server specifications not supported by Application Server, and the APIs that operate differently with CommonJ and Application Server.

Organization of this subsection

(1) Timer for Application Servers Specifications not supported by Application Server

The following table describes the Timer for Application Servers specifications not supported by Application Server.

Table 21‒7: Timer for Application Server specification not supported by Application Server (Vendor dependent functionality)

Specifications not supported by Application Server

Remarks

Customization of the number of maximum scheduling

The number of maximum scheduling is 50. You cannot change this number.

  • The class that implements the listener of TimerManager

  • Objects (EJB or servlets) other than the general Java objects, which do not inherit Java EE components

An error occurs if you schedule a class that inherits javax.ejb.EnterpriseBean. The error check is not performed for other cases.

Inherited items of the transaction context to execution threads

No transaction is performed regardless of the transaction status of the schedule source. This corresponds to NOT_SUPPORTED of CMT.

Customization of the inherited items of the J2EE context to execution threads

The items that are inherited are fixed.

The Java EE functionality that can be used in an execution thread

For details on the functionality that you can use, see 21.2.2 Java EE functionality that you can use in the asynchronous parallel processing of threads.

The components that you can use with J2EE applications are not defined in the Timer for Application Servers. For details on the components that you can use with the TimerManager for Application Server, see 21.3.5 Developing applications by using TimerManager.

(2) Work Manager for Application Servers specifications not supported by Application Server

The following table describes the Work Manager for Application Servers specifications not supported by Application Server.

Table 21‒8: Work Manager for Application Servers specifications not supported by Application Server (Vendor dependent functionality)

Specifications not supported by Application Server

Remarks

A remote execution of asynchronous thread processing by using WorkManager

If you remotely execute WorkItem, returns the dummy RemoteWorkItem that is executed locally.

Customizing the number of maximum scheduling

There is no limit for the number of maximum scheduling.

  • The class that implements the listener of TimerManager

  • Objects (EJB or servlets) other than general Java objects that do not inherit Java EE components

An error occurs, if you schedule a class that inherits javax.ejb.EnterpriseBean. The error check is not performed in other cases.

Creating WorkManager at a timing other than the start of an application

WorkManager is created only when an application starts.

Inherited items of the transaction context to execution threads

No transaction is performed regardless of the transaction status of the source of schedule. This corresponds to NOT_SUPPORTED of CMT.

Customizing the inherited items of the J2EE context to execution threads

The inherited items are fixed.

The Java EE functionality that can be used in execution threads

For details on the functionality that you can use, see 21.2.2 Java EE functionality that you can use in the asynchronous parallel processing of threads.

The components that you can use with a J2EE application are not defined with Work Manager for Application Servers. For details on the components that you can use with Work Manager for Application Server, see 21.4.4 Developing applications by using WorkManager.

(3) APIs that operate differently with CommonJ and Application Server

The following table describes the APIs that operate differently with CommonJ and Application Server.

Table 21‒9:  APIs that operate differently with CommonJ and Application Server

Class

Method

Operation on Application Server

commonj.timers.TimerManager

schedule(TimerListener listener,Date time)

If the listener inherits javax.ejb.EnterpriseBean, IllegalArgumentException is returned.

schedule(TimerListener listener,long delay)

If the listener inherits javax.ejb.EnterpriseBean, IllegalArgumentException is returned.

schedule(TimerListener listener,Date firstTime,long period)

If the listener inherits javax.ejb.EnterpriseBean, IllegalArgumentException is returned.

schedule(TimerListener listener,long delay,long period)

If the listener inherits javax.ejb.EnterpriseBean, IllegalArgumentException is returned.

scheduleAtFixedRate(TimerListener listener,Date firstTime,long period)

If the listener inherits javax.ejb.EnterpriseBean, IllegalArgumentException is returned.

scheduleAtFixedRate (TimerListener listener,long delay,long period)

If the listener inherits javax.ejb.EnterpriseBean, IllegalArgumentException is returned.

commonj.work.WorkManager

schedule(Work work)

If work is null, WorkException is returned.

schedule(Work work,WorkListener wl)

If work is null, WorkException is returned.

If WorkListener inherits javax.ejb.EnterpriseBean, IllegalArgumentException is returned.