How to map an EJB in database apart from storing as BLOB
Ram Som
Greenhorn
Joined: Nov 23, 2001
Posts: 1
posted
0
My CMP EJB has the following CMP fields. public class EmployeeBean implements EntityBean { public int empID; public String empName; private javax.ejb.EntityContext entityContext = null; final static long serialVersionUID = 206093459760846163L; public Address address; }
Now, how to map Address in database apart from storing as BLOB.
Kyle Brown
author
Ranch Hand
Joined: Aug 10, 2001
Posts: 3878
posted
0
(Maybe this should be in a FAQ somewhere...) We can't help you unless you tell us which Application Server you are working with. The database mapping tools and procedures are vendor-specific. Kyle ------------------ Kyle Brown, Author of Enterprise Java (tm) Programming with IBM Websphere See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
Ram, You can't map an object to the database with EJB's if it's not an EJB. What you want to try to do (for instance, have a Customer hold an Address) you must do in WebSphere and VAJ with CMP EJB Relationships. Basically, both your Customer and Address must both be EJB's. There is no other way to do this. I discuss this topic in a series of articles referenced on my web page below, and also at length in my book. Kyle ------------------ Kyle Brown, Author of Enterprise Java (tm) Programming with IBM Websphere See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
subject: How to map an EJB in database apart from storing as BLOB