You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Manu George <ma...@gmail.com> on 2007/04/03 14:33:24 UTC

How to make the Mdb container call ejbRemove

Hi
        How can I get the MDB Container to call the ejbRemove method.
The resource adapter has to call release() for this, How can i force
this to happen.

Regards
Manu

Re: How to make the Mdb container call ejbRemove

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Thanks David for this great comment :)

On 4/5/07, David Blevins <da...@visi.com> wrote:
>
>
> On Apr 5, 2007, at 1:01 AM, Mohammad Nour El-Din wrote:
>
> > Hi Manu...
> >
> > Actually we were discussing this about Stateless and Stateful
> > beans, but I
> > think it is the same for MDBs. The conclusion was that u can't test
> > this is.
>
> Just to clarify the conclusion, it was that you can't test it for
> Stateless.  You definitely can test it for Stateful and I know we at
> least have a unit test for it.
>
> And an interesting EJB 3.0 note.  The remove method of a Stateful
> bean can do neat things like throw an exception to prevent the
> removal of that bean.  This can be enabled through the
> retainIfException attribute of the @Remove annotation or in xml.
>
> One of the new things in EJB 3.0 I think is kind of neat.
>
> -David
>
> >
> > On 4/4/07, Manu George <ma...@gmail.com> wrote:
> >>
> >> ok I wanted to test the lifecycle callbacks for EjbRemove in Mdb. Any
> >> other way to do that?
> >>
> >> On 4/3/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
> >> > Hi Manu...
> >> >
> >> > I think by this question you will go in the same debate me and
> >> Prasad
> >> went
> >> > through with David few weeks ago, which concluded by that we
> >> can't force
> >> a
> >> > container to remove an EJB, but take care, I am talking from the
> >> client's
> >> > point of view.
> >> >
> >> > On 4/3/07, Manu George <ma...@gmail.com> wrote:
> >> > >
> >> > > Hi
> >> > >         How can I get the MDB Container to call the ejbRemove
> >> method.
> >> > > The resource adapter has to call release() for this, How can i
> >> force
> >> > > this to happen.
> >> > >
> >> > > Regards
> >> > > Manu
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Thanks
> >> > - Mohammad Nour
> >> >
> >>
> >
> >
> >
> > --
> > Thanks
> > - Mohammad Nour
>
>


-- 
Thanks
- Mohammad Nour

Re: How to make the Mdb container call ejbRemove

Posted by David Blevins <da...@visi.com>.
On Apr 5, 2007, at 1:01 AM, Mohammad Nour El-Din wrote:

> Hi Manu...
>
> Actually we were discussing this about Stateless and Stateful  
> beans, but I
> think it is the same for MDBs. The conclusion was that u can't test  
> this is.

Just to clarify the conclusion, it was that you can't test it for  
Stateless.  You definitely can test it for Stateful and I know we at  
least have a unit test for it.

And an interesting EJB 3.0 note.  The remove method of a Stateful  
bean can do neat things like throw an exception to prevent the  
removal of that bean.  This can be enabled through the  
retainIfException attribute of the @Remove annotation or in xml.

One of the new things in EJB 3.0 I think is kind of neat.

-David

>
> On 4/4/07, Manu George <ma...@gmail.com> wrote:
>>
>> ok I wanted to test the lifecycle callbacks for EjbRemove in Mdb. Any
>> other way to do that?
>>
>> On 4/3/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
>> > Hi Manu...
>> >
>> > I think by this question you will go in the same debate me and  
>> Prasad
>> went
>> > through with David few weeks ago, which concluded by that we  
>> can't force
>> a
>> > container to remove an EJB, but take care, I am talking from the
>> client's
>> > point of view.
>> >
>> > On 4/3/07, Manu George <ma...@gmail.com> wrote:
>> > >
>> > > Hi
>> > >         How can I get the MDB Container to call the ejbRemove  
>> method.
>> > > The resource adapter has to call release() for this, How can i  
>> force
>> > > this to happen.
>> > >
>> > > Regards
>> > > Manu
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks
>> > - Mohammad Nour
>> >
>>
>
>
>
> -- 
> Thanks
> - Mohammad Nour


Re: How to make the Mdb container call ejbRemove

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Manu...

Actually we were discussing this about Stateless and Stateful beans, but I
think it is the same for MDBs. The conclusion was that u can't test this is.
I think we will leave to actual applications which may or may not discover
bugs or problems related to this matter.

On 4/4/07, Manu George <ma...@gmail.com> wrote:
>
> ok I wanted to test the lifecycle callbacks for EjbRemove in Mdb. Any
> other way to do that?
>
> On 4/3/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
> > Hi Manu...
> >
> > I think by this question you will go in the same debate me and Prasad
> went
> > through with David few weeks ago, which concluded by that we can't force
> a
> > container to remove an EJB, but take care, I am talking from the
> client's
> > point of view.
> >
> > On 4/3/07, Manu George <ma...@gmail.com> wrote:
> > >
> > > Hi
> > >         How can I get the MDB Container to call the ejbRemove method.
> > > The resource adapter has to call release() for this, How can i force
> > > this to happen.
> > >
> > > Regards
> > > Manu
> > >
> >
> >
> >
> > --
> > Thanks
> > - Mohammad Nour
> >
>



-- 
Thanks
- Mohammad Nour

Re: How to make the Mdb container call ejbRemove

Posted by Manu George <ma...@gmail.com>.
ok I wanted to test the lifecycle callbacks for EjbRemove in Mdb. Any
other way to do that?

On 4/3/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
> Hi Manu...
>
> I think by this question you will go in the same debate me and Prasad went
> through with David few weeks ago, which concluded by that we can't force a
> container to remove an EJB, but take care, I am talking from the client's
> point of view.
>
> On 4/3/07, Manu George <ma...@gmail.com> wrote:
> >
> > Hi
> >         How can I get the MDB Container to call the ejbRemove method.
> > The resource adapter has to call release() for this, How can i force
> > this to happen.
> >
> > Regards
> > Manu
> >
>
>
>
> --
> Thanks
> - Mohammad Nour
>

Re: How to make the Mdb container call ejbRemove

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Manu...

I think by this question you will go in the same debate me and Prasad went
through with David few weeks ago, which concluded by that we can't force a
container to remove an EJB, but take care, I am talking from the client's
point of view.

On 4/3/07, Manu George <ma...@gmail.com> wrote:
>
> Hi
>         How can I get the MDB Container to call the ejbRemove method.
> The resource adapter has to call release() for this, How can i force
> this to happen.
>
> Regards
> Manu
>



-- 
Thanks
- Mohammad Nour