Arun Murugesan wrote:

> Hi
>
> May be a basic question. Sorry for that.
> Can anyone tell the difference between having a Stateless Session Bean and
> having the samething implemented inside a static method of a class ?
>
> For example I have simple case to add two numbers with a method Add( num1,
> num2 ). I can have this in a Math class.
> I can call Add without instatiating Math. So I am not doing a "new" in this
> case.
>
> Any good reason why I should implement something like above as a stateless
> session bean.

>
> In what way stateless bean gives advantage ?
>

They run on the server, in an EJB context (having access to declarative
transaction management, to environment entries, and other services provided by
the container, like datasources, connection pooling, security context), and
closer to the other business components (entity beans, etc.), which enhances
your performance. They allow you to isolate the presentation logic from the
business logic.

JB.

>
> Regards
> Arun M
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

--
Jean-Baptiste Nizet
[EMAIL PROTECTED]

R&D Engineer, S1 Belgium
Kleine Kloosterstraat, 23
B-1932 Sint-Stevens Woluwe
+32 2 200 45 42

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to