Since we're thinking of calling the release 3.1, I started looking at implementing singleton beans.

Started hacking last night and think I might have something working.

Here are some of my "singleton" spec notes. Perhaps too terse to the point of being useless, but I figured I'd share anyway.

In general, think stateless bean where there is exactly one instance (no pool) that is created at startup and never destroyed.

Singletons:

 - concurrent access
 - session bean
 - supports web services
 - not activated or passivated
 - can use javax.ejb.TimerService
 - can have EJBHome/EJBLocalHome interfaces
 - With @Startup created when app starts
 - @DependsOn allows for startup ordering
 - does not support remove
 - instances not discarded on system exception
 - Bean-Managed or Container-Managed Concurrency
 - Container-Managed Concurrency method attributes:
    - ReadOnly (shared access)
    - ReadWrite (exclussive access), the default


Some related new API classes (subject to change):
 - @Singleton (class)
 - @Startup (class)
 - @DependsOn (class)
 - @ContainerManagedConcurrency (class)
 - @BeanManagedConcurrency (class)
 - @ReadOnly  (class, method)
 - @ReadWrite (class, method)
 - ConcurrentAccessTimeoutException


Will post more details as I get them.

-David

Reply via email to