About Question enthuware.oce-ejbd.v6.2.492 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
deadlock_gr
Posts: 54
Joined: Tue Apr 19, 2011 10:32 am
Contact:

About Question enthuware.oce-ejbd.v6.2.492 :

Post by deadlock_gr »

I have 2 points:

1. The business method is not called by the container, but by the client.
2. Also, what if the setSessionContext method does not exist, and the SessionContext is rather injected?

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.492 :

Post by admin »

1. It is the container that invokes the business method as result of a call from the client.
2. Even if the Session Context is injected, it would be done after the constructor is done. But your point is valid, this may cause confusion. It needs to be improved.

Thanks for the feedback!

jszczepankiewicz

Re: About Question enthuware.oce-ejbd.v6.2.492 :

Post by jszczepankiewicz »

misspell in explanation:
(...)It can also not implement SessionSyncrhonization.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.492 :

Post by admin »

Fixed. Thanks for your feedback!

kezman9
Posts: 26
Joined: Fri Jul 06, 2012 1:08 am
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.492 :

Post by kezman9 »

The answer says that the first method called on SLSB by container is constructor. I think it's precise to say that container calls newInstance on bean class which in turn invoke the zero-argument constructor.

Spec 4.7.1
A stateless session bean instance’s life starts when the container invokes the newInstance method on the session bean class to create a new session bean instance.
But as for me the original explanation is also clear.

Thanks,
Jarek

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.492 :

Post by admin »

kezman9 wrote:The answer says that the first method called on SLSB by container is constructor. I think it's precise to say that container calls newInstance on bean class which in turn invoke the zero-argument constructor.
Fixed.

thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest