Hello,
does anybody know how (and if is it possible) to store
lists,trees,hashtables... using EJB and representing a tree, a list.. with
an EJB? For example, when I've tried to do it with this CMP Entity Bean,
the
EJB server said me "I don't know how to map my_list to database" (I'm using
WebLogic 5.1):
class MyEJBLinkedList implements EntityBean {
public Integer PK_MyEJBLinkedList; // The Primary Key
public java.util.LinkedList my_list; // This is a
Serializable object!!
// The functions here are not important, the are very
simple.
}
--------------------
The problem is that the container can't save the hashtable straight into
the database as it is. Depending on the column type you have chosen for
this particular member.
This is database specific usually. If you use cloudscape, the db server has
the possibility to serialize the hashtable into the database. More "normal"
databases such as Oracle and such, do not have this possibility and you
have to serialize the hashtable yourself in the ejbStore and ejbLoad
method.
The best way however is to implement it as an BMP and build the hashtable
yourself.
Regards
Erik Romson
===========================================================================
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".