Welcome to JaxMe!

SourceForge.net Logo

- A Framework for Java/XML binding based on SAX2 -


  1. General questions
    1. Why JaxMe?
    2. JaxMe License
  2. The Generator
    1. What is the supported subset of XML Schema?
    2. What are JaxMe's find and list methods ?
    3. How is the EJB support working?
    4. Any plans for Tamino support?
    5. Any plans for XML:DB?
    6. Why are the field names uppercased when using the XsdJdbcSchemaReader?
  3. Using the generated classes
    1. How do I generate a primary key?

General questions

Why JaxMe?

After working with JAXP, JAXB, JAXM and all the other stuff for quite some time I began to automatically associate "JAXsomethingE" with anything related to Java and XML. So this is "Me" JAX or JaxMe.

The name is ridiculous. I know. Sometimes we'll probably find something better. (And, who knows, perhaps we even find someone changing the sources then ... :-)

JaxMe License

JaxMe comes to you under the terms of the BSD License. In short this means you can do almost anything with it: Use it, modify it, extend it, sell it (hej, sometimes I really wish I'd have some instincts of sales people in me ...), use it in commercial products or projects, whatever you want. It's an open source license.

The license requires, that you drop a note on the origin of JaxMe and the author, but IMO this is good for nothing, so you may safely forget it. However, I reserve the right to change the license of any future version to another open source license. (org.apache.jaxme, we all have dreams ... :-)

The Generator

What is the supported subset of XML Schema?

This subset is documented as an XML Schema in the file jaxme.xsd from the JaxMe distribution. It is quite limited, but usable, if you have control over the schema. It is probably unusable, if you haven't.

In short the following is supported:

  • Atomic elements without attributes
  • Complex elements that contain a sequence
  • Complex elements that contain a choice

But the following is not supported:

  • Atomic elements with attributes
  • Mixed content
  • Mixed use of sequence and/or choice
  • Recursion

How is the EJB support working?

JaxMe contains a generator for entity beans with bean managed persistence. Details can be found in BeanWriter.html. The BeanWriter also supports the generation of stateless session beans that perform queries and return XML data. (So called list methods.)

What are JaxMe's find and list methods?

You know what an SQL view is? Forgetting updatable views, one could describe them as a stored query that returns some data of a fixed format. In essence this is what JaxMe's find and list methods are: You specify a query that is compiled by the source code generator. The result are Java sources that can perform the specified query, possibly configured with some options that you may also specify.

The difference between find and list methods is that the former returns objects which you may modify and store back. So find methods are somewhat closer to updateable views, because they are bound to a specific table.

How is Tamino supported?

Software AG, the vendor of Tamino, is my employer and I use Tamino it in my daily work. So support for Tamino is essential. Unfortunately it seems that this is going to be a year of JDBC projects for me. (Unfortunately, because working with Tamino is definitely much more fun than using DB2, Oracle or whatsoever. Believe me, it's a sexy database! :-) Customer decides what we do.

In other words, I have found the time to implement a simple Tamino manager. It is a generic manager, not a specific manager per document type. (As I said, working with Tamino is much simpler.) However, the following is not (yet!) supported, although it really should:

  • Tamino transactions
  • Find and list methods (truely important for the upcoming XML Query language)
  • Use of the official TaminoAPI4J (the current manager is based on a simple SAX handler)

For details of the Tamino support see here.

Any plans for XML:DB support?

Not yet. Should be simple, as in the case of Tamino it should be sufficient to implement a generic JMXMLDBManager. Perhaps you'd like to volunteer?

Why are the field names uppercased when using the XsdSchemaReader?

Field names are built from column names, which are in turn read via JDBC metadata. However, most databases are storing column names uppercased internally.

As a workaround, you may specify an alternative field name. See the IPADDRESS column in the Session example for how to do that.

Using the generated classes

How do I generate a primary key?

JaxMe doesn't contain a primary key generator: Most probably your database contains a sequence generator, an autoincrement column or something similar that can be used to let the database generate primary keys. If this is the case, may be the special JaxMe type jdm:autoSql does its job for you? For example, you create a sequence and specify the primary key column as

        <xs:element name="ID" type="jdm:autoSql">
              <-- The column will be filled from a sequence. -->
              <jdm:autoSql base="xs:integer"

  FAQ   |   Reference   |   Contact   |   Comments   |   Forward   |   Back   |   Top of Page