> Hi all,
>
[quoted text clipped - 4 lines]
> private method in the EJB. The questions are, does the EJB specification
> allow
The term Entity Java Bean (EJB) may refer to Message-Driven,
Stateless/Stateful Session or Entity beans. For the purpose of my
response I will assume you are talking about a stateless session bean
although it may hold for some of the other types. In addition, by
functions I assume you refer to "methods" and therefore fn1 and fn2 are
declared methods.
> 1) To have as many private, public or protected mthods in EJB, but only some
> of them are exposed as business methods?
Yes. Although best practise would be to have helper classes to avoid the
use of excessive private utility method definitions in the EJB classes.
There are some restrictions
> 2) Can fn1 call fn2 within the EJB ?
Yes. If the method fn1 is transactional then the transaction attributes
of fn1 would set the transactional scope for fn2.
> 3) ***Most important*** When fn1 calls fn2, will the invocation call go out
> of the container( from fn1) and come back ( to fn2) ?
No. Not unless you call it via its remote interface. The reason for
calling it via its remote interface may be to allow CMT transaction
demarcation if the method is transactional. I would visit the Sun EJB
reference site for further information.
> Please help, because we need to implement this in out architecture, thanks a
> million.
>
> Best regards,
> Ravi
See comments above. From experience, I have found Entity Beans to be a
nightmare. I modified our application architecture to use Hibernate for
persistence with session bean facades and the application
maintainability ,development speed and performance has increased
dramatically.
Ravi Shankar Nair - 19 May 2006 16:14 GMT
Hi John,
Thanks a lot for the reply and your time. Please let me know if you get some
more information from ejb spec, thanks
Regards,
Ravi
>> Hi all,
>>
[quoted text clipped - 38 lines]
> persistence with session bean facades and the application maintainability
> ,development speed and performance has increased dramatically.