java - Can I call from one ejb3 session bean method to other method in same session bean ? -


can call 1 ejb3 session bean (statless/statefull) method other method in same session bean ? state of members save between calls ?

yes, can. use @resource sessioncontext inject instance, , use getbusinessobject (or getejbobject or getejblocalobject depending on view want); see javadoc methods.

for stateless beans, invocation on new bean instance. depending on you're trying do, can simpler use @ejb yourinterface directly inject proxy rather using sessioncontext.

for stateful beans, state of bean "preserved" because you'll invoking same underlying bean instance.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -