Entity EJBs and XML as back-end instead of a database...

Discussions

EJB design: Entity EJBs and XML as back-end instead of a database...

  1. Hi,
    Is there anyone that has tried to use XML as a database using a key-value mode of parsing through the XML file. My intent is to use an XML file for persistent storage instead of a database. I have developed a skeleton but am confused as to how to use the findByPrimaryKey() method and other database dependent methods. Any examples out there?

    Thanks.

    A
  2. I believe you will find this is an incredibly slow mechanism in comparison to a RDBMS. Whats the driver to use XML for your own data storage? Seems a very odd use of XML.

    Dave Wolf
    Internet Applications Division
    Sybase
  3. Hi,
    This is to avoid re-doing the database schema or maintaining another database altogether. This is to work as an external caching mechanism. The architecture is too layered to allow direct database communication.

    We have also checked that there is a JDBC driver solely for the purpose of talking to an XML file and use it as an XML, but it is not an open-source at this point in time.

    You will start noticing a growing use of XML in place of a database, especially as DSML (LDAP/JNDI as XML format) will also come into it's own.

    Thanks.

    A
  4. Hi Ash,

    I'm also trying to use XML flat files as the data source for an EJB, and having problems. Could you give me details of the JDBC driver you've found.

    I've tried creating my own DOMService class to read in the XML and allow the Bean to access the data, but I can't seem to get the app server to register this class as a JNDI resource.

    Cheers
    Dave

  5. Hi,
    You may refer to the following URL...there is mention of an XML Support Feature.
    http://www.informix.com/informix/techbriefs/jdbc/jdbc.htm