Board index » jbuilder » looking up entity beans through its remote interface

looking up entity beans through its remote interface


2003-07-16 06:18:15 AM
jbuilder17
Hi,
I'm trying to test an entity bean. I created a JUnit test case using
JBuilder's EJB Test Client wizard.
Now after deploying my entity bean to the app server, I ran my test case. I
got an error javax.naming.NameNotFoundException, name not bound, and the
line where the exception occurs is when I perform a context lookup for my
Remote object. I tried looking up my Remote Home object instead, or my
Local Home or Local object, but got the same error.
Is there anything else I need to do aside from deploying my entity bean to
the app server (by copying the jar file to my app server's deploy
directory)? Why do I get this error?
Thanks.
 
 

Re:looking up entity beans through its remote interface

Entity beans are created as local EJB's by default. Have you enabled their
remote interfaces?
As a general rule, entity beans should really remain as local objects; the
load on the database server when they are accessed remotely can grow quite
quickly. Create a session facade that uses the entity bean and then run
your test case against the session bean.
--
Check out our latest white papers at
www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
www.datadevelopment.com/
"Tiffany Chua" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

I'm trying to test an entity bean. I created a JUnit test case using
JBuilder's EJB Test Client wizard.

Now after deploying my entity bean to the app server, I ran my test case.
I
got an error javax.naming.NameNotFoundException, name not bound, and the
line where the exception occurs is when I perform a context lookup for my
Remote object. I tried looking up my Remote Home object instead, or my
Local Home or Local object, but got the same error.

Is there anything else I need to do aside from deploying my entity bean to
the app server (by copying the jar file to my app server's deploy
directory)? Why do I get this error?

Thanks.