Limitations of custom services
When you develop a custom service, it is important to be aware of the following restrictions and limitations:
The init and shutdown methods must return control to the runtime.
No work is dispatched into the server instance until all custom service initialize methods are complete.
The init and shutdown methods are called only once on each service, and once for each operating system process that is part of the server instance. File I/O is supported.
Initialization of process level static data, without leaving the process, is supported.
Only JDBC resource manager local transaction operations are supported. Every unit of work must be completed before the methods return.
Creation of threads is not supported.
Creation of sockets and I/O, other than file I/O, is not supported. Execution of standard J2EE code (client code, servlets, enterprise beans) is not supported.
The JTA interface is not available. This feature is available in J2EE server processes and distributed generic server processes only.
When the runtime calls shutdown, there is no guarantee that shutdown is called prior to process termination.
Custom services are initialized serially, but in no predictable order.
If a custom service is not found, the system writes a stack trace to the SystemOut.log file and returns an error message similar to this one:
[1/29/04 16:54:19:074 UTC] f4ad2ab5 CustomService W WSVR0018W: Unable to create CustomService, MyCustomService java.lang.ClassNotFoundException: com.myco.cs.MyCustomServiceThe application server starts successfully and custom services for which the class is found run successfully.
Note that these restrictions apply to the shutdown and init methods equally. Some JNDI operations are available.