EJB Client Stub jar - Concept Evaluation

M

Manju

Dear all
When we deploy any Enterprise Java Bean (Session Bean or Entity
Bean ), it generates Client stub jar.
It is always said that this stub jar is for client as proxy and it is
supposed to be reference to ejbs not the the actual implementation.
Practally when we extracted this client jar we could see the classes
of Actual EJB also.
In RMI , in stubs I have never found implementaed class.

So, what this client stub jar in EJB actually does? Is this a
different concept of stub?
Because we always say that implementation is hidden

Waiting for answer
Regards

Manjiri Tatke
 
L

Lew

Manju said:
Dear all
When we deploy any Enterprise Java Bean (Session Bean or Entity
Bean ), it generates Client stub jar.
It is always said that this stub jar is for client as proxy and it is
supposed to be reference to ejbs not the the actual implementation.
Practally when we extracted this client jar we could see the classes
of Actual EJB also.
In RMI , in stubs I have never found implementaed class.

So, what this client stub jar in EJB actually does? Is this a
different concept of stub?
Because we always say that implementation is hidden

You use Google Groups, don't you, you poor benighted poster.

When one says that the "implementation is hidden" in object-oriented (OO)
programming, one doesn't mean that a human cannot get to it, one means that
client code cannot get to it.
 
M

Manju

Hi Lew,
Thanks.
But in oops also when we say implementation is hidden that means the
actual method body is hidden and via declaration of it in the
interface we access it.
In EJB for that we are using Home interface to gain access to actual
bean class and to access business methods via Component interface of
the actual bean methods as per specification. That means it is clear
indication that implementation of business mehtods must be
hidden....right?
then why the actual bean class has been provided in client stub jar?
I am confused.
Just check

Waiting for disussion on this

Regards

Manjiri Tatke
 
L

Lew

Manju said:
Hi Lew,
Thanks.
But in oops also when we say implementation is hidden that means the
actual method body is hidden and via declaration of it in the
interface we access it.

Again, that applies only to client code. The human is still perfectly able to
read the implementation.

Please do not top-post. It makes following the conversation more confusing
and annoys those who would help you.
In EJB for that we are using Home interface to gain access to actual
bean class and to access business methods via Component interface of
the actual bean methods as per specification. That means it is clear
indication that implementation of business mehtods must be
hidden....right?

Not really. The Home interface is to help implement cross-JVM calls, and is
regarded by many as too kludgy. Anyhow, this is still "hidden" in the sense
of inaccessible to client code and not in the sense of obscured to human eyes.
then why the actual bean class has been provided in client stub jar?

I don't know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top