What are some common practices in storing XML data in a J2EE application? My co-workers want to store the XML String directly in an entity bean.
We are attempting to use CMP entity beans first but the problem is that Java Strings are translated to VARCHAR(256) and our XML documents are definitely longer than 256 characters. I believe we can use BMP instead and persist the XML string to the data type TEXT.
Another approach is to store an object graph of the XML document. This graph would be very similar to the DOM tree for the XML. This seems to be a lot of work for merely persisting XML documents. The parsing and serializing of the objects may prove too costly.
What are your thoughts in this matter?
Senior Internet Developer
cng at internetivity dot com
InterNetivity Inc. - The Information Outreach Pioneer
Visit The Analysis Engine for the Web at http://www.databeacon.com