You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Per Newgro <pe...@gmx.ch> on 2010/04/09 09:21:04 UTC
Example for singleton sessionbean in EJB 3.0 (without @Singleton)
Hi *,
i would like cache some data in the container same for all users
(current date etc.).
I implemented it with ejb 3.1 @Singleton annotation. All works fine. But:
i have to guarantee portability of my app. But jboss is not supporting
EJB 3.1 these days.
It's not an option to use their M2. So i decided to use the single
sessionbean in pool
configuration described in the openejb-wiki : singleton page.
But i don't know how to configure the poolsize for a bean. Can anyone
help me out here?
Thanks
Per
Re: Example for singleton sessionbean in EJB 3.0 (without @Singleton)
Posted by Per Newgro <pe...@gmx.ch>.
Really only for all beans?
I think i remember a way of extend the bean type configuration "Default
stateless container".
If the pool-size configuration is bound to this and there is a way for
extend and assign
(to the singleton bean) it, then it could be configured only for beans
related to the extended
container.
What do you think?
But i don't know exactly how this could be implemented.
Cheers
Per
Re: Example for singleton sessionbean in EJB 3.0 (without
@Singleton)
Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Only available at container level (ie. for all beans)!
Jean-Louis
Per Newgro wrote:
>
> Thanks, would be great to hear from you.
>
> Cheers
> Per
>
>
--
View this message in context: http://n4.nabble.com/Example-for-singleton-sessionbean-in-EJB-3-0-without-Singleton-tp1816013p1836772.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Example for singleton sessionbean in EJB 3.0 (without @Singleton)
Posted by Per Newgro <pe...@gmx.ch>.
Thanks, would be great to hear from you.
Cheers
Per
Re: Example for singleton sessionbean in EJB 3.0 (without
@Singleton)
Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi,
The poolSize of the stateless container can be set in the openejb.xml file.
But, AFAIK it is available only at container level (for all beans).
Need to check ...
Jean-Louis
Newgro wrote:
>
> Hi *,
>
> i would like cache some data in the container same for all users
> (current date etc.).
> I implemented it with ejb 3.1 @Singleton annotation. All works fine. But:
>
> i have to guarantee portability of my app. But jboss is not supporting
> EJB 3.1 these days.
> It's not an option to use their M2. So i decided to use the single
> sessionbean in pool
> configuration described in the openejb-wiki : singleton page.
>
> But i don't know how to configure the poolsize for a bean. Can anyone
> help me out here?
>
> Thanks
> Per
>
>
--
View this message in context: http://n4.nabble.com/Example-for-singleton-sessionbean-in-EJB-3-0-without-Singleton-tp1816013p1836700.html
Sent from the OpenEJB User mailing list archive at Nabble.com.