The BeanWriter has created an entity bean, because the structure
was specified by reading a table definition. In other words,
because data can not only be read, but also inserted, updated or
deleted. If the structure would be specified with a
JaxMe view, then it would have created
a session bean instead. The session bean could only read data.
Session beans, that are generated from JaxMe views, can have
similar methods, which are called listXXX()
methods.
They are specified as list methods in the
JaxMe view definition.
Compatibility with EJB 1.1
By default the BeanWriter creates sources as specified by EJB 2.0.
However, in a few cases these are incompatible with EJB 1.1. In
particular the constructor new EJBException(msg, exception)
is not available in EJB 1.1.
If you specify the option ejb11compatible
, then this
behaviour changes. For example, the command line to run JaxMe might
look like this:
java -classpath xerces.jar;jaxme.jar de.ispsoft.jaxme.generator.Main
--schemaReader=de.ispsoft.jaxme.generator.XsdJdbcSchemaReader
--sourceWriter=de.ispsoft.jaxme.generator.JavaSourceWriter
--sourceWriter=de.ispsoft.jaxme.generator.BeanWriter
--option=ejb11compatible=true
examples/session/schema.xsd