I am 2 week old to EJB.
How do i wrap my entity bean with a session bean.
Eg : -
I am having a Entity bean EntityAccount.java and a session bean SessionAccount.java. Now i want to call the entity bean from this session bean. I don't want to use create method of entity bean. Is there any way by which i can call the entity bean without the create method ?
Please help me...
Janarthan S
-
wrap entity bean (2 messages)
- Posted by: Janarthan S
- Posted on: January 13 2003 08:08 EST
Threaded Messages (2)
- wrap entity bean by siva kumar on January 16 2003 03:47 EST
- wrap entity bean by siva kumar on January 16 2003 03:55 EST
-
wrap entity bean[ Go to top ]
- Posted by: siva kumar
- Posted on: January 16 2003 03:47 EST
- in response to Janarthan S
Hi!
First conceptually are you very clear with what is entity bean and what is the differance between session and entity beans?.Its adviceable that you can read some books on EJB :Enterprise Java Beans by Richard Monson-Haefel from O'Reilly publications or any other which like.
>I don't want to use create method of entity bean. Is there >any way by which i can call the entity bean without the >create method ?
Remember create method is used for creating/inserting a new record/s into the database.If you want to fetch some already created record/s you need to use findByPrimaryKey method of HomeInterface.Base on your UseCase u need to use either of the two methods i.e create or finByPrimaryKey method .
shiva -
wrap entity bean[ Go to top ]
- Posted by: siva kumar
- Posted on: January 16 2003 03:55 EST
- in response to siva kumar
Hi !
Sorry i missed one point, on wraping entity with session bean its an easy stuff just make a Jndi lookup within your session bean buisness method and invoke ur entity bean field methods through home and remote interfaces of entity bean.Hope u know the bean development cycle.
shiva