I have the question and expect an negative answer, but would like to try anyway.
I want to ask the Community, if there's a possibility to deploy a new service with EAR archive so, that it will be started on deploy and stopped on undeploy of the application? ("started" - read "instance created and rebinded to JNDI"; "stopped" - read "method stop of the instance will be invoked and unbind from JNDI accomplished").
For example, simple schedule service (Scheduler), which checks database for new records and does some jobs, when records are presented. The need of cooperative deployment is conditioned by the fact, that this service closely works with other classes and environment of the application. For example this Scheduler used EntityBeans for DB access, utilities and so on.
What would you say ?
P.S. Please, don't propose me MBeans solutions = this way is more or less clear, but doesn't suit.