Found in code this time ;) Is your ejb a singleton? Did you set @lock(read)?
Working thread can be done with @Asynchronous in javaee 6 Le 9 juil. 2013 18:52, "Leonardo K. Shikida" <[email protected]> a écrit : > MinSize does instantiate these :-) > > Where did you find this parameter? > > But the method annotated with @Schedule is run only for one instance > at a time. I thought it should run for all of them. > > How people usually implement the concept of working threads in EJB? > Maybe I am trying to do this in the wrong way. > > TIA > > Leo > > > On Tue, Jul 9, 2013 at 1:37 PM, Romain Manni-Bucau > <[email protected]> wrote: > > Did you try MinSize? > > Le 9 juil. 2013 18:16, "Leonardo K. Shikida" <[email protected]> a > écrit : > > > >> Hi Romain > >> > >> I've added to tomee.xml > >> > >> <Container id="foo" type="STATELESS"> > >> PoolSize=10 > >> </Container> > >> > >> but it didn't worked as I was expecting. > >> > >> I thought it would instantiate 10 instances. > >> > >> I've also added a sysout in the > >> > >> @PostConstruct > >> public void init() { > >> System.out.println("Hello "+this); > >> > >> I thought I'd have 10 lines in the first service, but there was only > one. > >> > >> Do I have to set somewhere (somehow) that my bean is using this > >> container or tomee assumes it's the default configuration for all > >> stateless beans? > >> > >> TIA > >> > >> Leo > >> > >> > >> On Tue, Jul 9, 2013 at 12:29 PM, Romain Manni-Bucau > >> <[email protected]> wrote: > >> > Hi > >> > > >> > The basic conf is here > >> http://tomee.apache.org/containers-and-resources.html > >> > > >> > You can set PoolSize (MaxSize) but MinSize too > >> > Le 9 juil. 2013 14:45, "Leonardo K. Shikida" <[email protected]> a > >> écrit : > >> > > >> >> Hi > >> >> > >> >> I am using a stateless bean to consume from a jms queue periodically > >> >> (@Schedule). It's started with the container (@Startup). Is there any > >> >> way to configure somewhere the initial number of instances for this > >> >> specific bean? > >> >> > >> >> TIA > >> >> > >> >> Leo > >> >> > >> >
