Guillaume Sauthier schrieb:
> ekke a écrit :
>> Guillaume,
>>
>> Bean A has @Local and @Remote
>> so there should be 2 registered services for this bean:
>> one for the local and one for the remote
>>
>> but if I have Beans A,B,C,D then there should be 8 services,
>> buit there are 20:
>> 8 for A
>> 6 for B
>> 4 for C
>> 2 for D
>>
>> and if I list the services from OSGI console I see (looking at the id)
>> that they are registered like the list below
>
> In this order ?
> Or is D started first, and then C, then B and finally A ?
see my other example I just sent before
>
> After a little digging in our code ,I've seen something wrong, but it
> does not explains the behavior at first glance...
> In EZB, we have the concept of BindingFactory, that manage how we
> publishes business interfaces of the beans.
> So there is a default one, that manages JNDI. And for OSGi, we added an
> OSGiBindingFactory. This is that class that register/unregister services
> for your bean's interfaces.
> This factory is added in a singleton BindingManager.
> It's added during the core component startup, but it's never removed.
> You see where I wanna go ?
> if you start multiple cores, the OSGiBindingFactory will be registered
> multiple times, with the effect of adding 2 more services (1 for @Local
> 1 for @Remote) for each of your beans ...
>
> So the question is: "Do you start multiple cores ?"
>
no, there's only one easybeans.core
I'm using the EasyBeans agent to start all Easybeans components
and I'm only waitong until all components are registered,
then I wait until all datasources are available
then I start my EJB bundle (containing SLSB and Interfaces in one bundle,
also containing persistence.xml)
ekke