Hello, Markus

now I get it ^^ (at least I think so)

So, to summarize it: you work with a CMP bean that is used by various
other beans (JMS in particular). After all things have been done I want
to remove the bean?

Using ejbRemove() is OK but you may want to use the Collection version
of ejbRemove. I think (if I remember correctly) that ejbRemove() always
crashed the EJB container. So I used the collection method. It is a
little bit difficult but it worked.

Give it a try and tell us if it works.

Best regards

Dirk

mahu2425 schrieb:
> Hello Dirk,
> 
> in my scenario the entity bean stores some data from an ERP system. The data 
> is required for a number of steps (function calls, data for message driven 
> beans, etc.).
> 
> After all (concurrent) tasks have been completed, the entity bean is no 
> longer required and can remove itself.
> 
> The scenario is a little bit compareable to the one in Sun's J2EE tutorial:
> http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMSJ2EEex3.html
> 
> So, what I need is just a ways to remove an entity bean. The special problem 
> here is that the entity bean needs to call it's own remove method.
> 
> As I said in my first posting, I would prefer to call the remove() method 
> from the entity bean's remote interface instead of calling ejbRemove(), but 
> calling remove() seems to crash the server (the remove is done during a Timer 
> callback). It seems that Geronimo is struggeling between removing the bean 
> and completing the timer transaction (in fact is trys to roll it back). If 
> you try to restart the server after the crash you'll always get an exception 
> that a GBean has been destroyed. I never managed to get the server back to 
> work in this case (had to start with a new installation).
> 
> So, I think there should be a possibility that an entity bean can remove 
> itself. It could be discussed whether is should call remove() or ejbRemove(). 
> Sun seems to prefer ejbRemove().
> 
> 
> Best regards,
> 
> Markus
> 
> 
> 
>>  Hello, Markus
>>  
>>  It's just a little bit difficult to understand why you (the user) should
>>  handle the instance of a bean :-/ That's the job of the EJB container
>>  (greetings to the OpenEJB people). Or can you post a scenario where you
>>  definitely need to remove an EJB? Share your idea :P
>>  
>>  AFAIK it's not your business to know too much of the EJB container and
>>  its EJB instances :P
>>  
>>  Best regards
>>  
>>  Dirk
> 
> Benachrichtigung bei E-Mail Empfang! - 
> http://mail.lycos.de/app/lycosinside/setupLI.exe

Reply via email to