geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mahu2425" <mahu2...@lycos.de>
Subject Re: Entity bean can not remove itself
Date Thu, 01 Jan 1970 00:00:00 GMT
Hello,

has nobody an idea if this migh be a bug or if I'm doing anything wrong? I really need this
feature, that an entity bean can remove itself.

Could anybody help me?   ;-)


Best regards,

Markus



>  Hi there, 
>  
>  I have an entity bean (CMP) that uses the TimerService and includes 
>  the TimedObject interface. When the callback function ejbTimeout(Timer timer) 
>  on the entity bean is executed, the bean should remove itself. 
>  
>  
>  
>  My code looks like: 
>  
>  public void ejbTimeout(Timer timer) {
>    ejbRemove();
>  }
> 
> 
> I inserted a few debug statements and I'm sure that ejbTimeout() is executed. Unfortunally
the 
> bean will not be removed.
> 
> Has anybody an idea what's going wrong or if this might be a bug? 
> 
> I also tried to remove the bean using the remove() method from the remote interface as
well as
> removing it using the remove() method from the home interface. In both cases an exception
will be 
> thrown (transaction rolled back, could not remove timer) and the server will be completly
crash 
> (GBean DESTROYED message) and will no longer successfully startup at a restart. So, calling
remove() 
> seems to be a bad idea, but ejbRemove() doesn't work (the Sun J2EE tutorial says ejbRemove()
should 
> work).
> 
> What can I do to let the entity bean remove itself?
> 
> 
> Greets, Markus

Benachrichtigung bei E-Mail Empfang! - http://mail.lycos.de/app/lycosinside/setupLI.exe
Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message