S
Stefan Siegl
Hello it's me again,
I am currently writing my master thesis about a customer relationship
management (CRM) system. The special thing about this component is that
the model (the way the CRM data is described) can be changed at runtime.
That means I do not have the model at compile time. I already posted
here to get general hints from you guys (sry don't know how to link to
the other news message, but the name was: Compile java sources inside
J2EE component)
I specified the component in more detail and am currently trying to
integrate a persistence layer to persist data. My approach is to create
classes at runtime that reflect the current model and use instances of
these classes to represent data entered according to this model.
The classes are loaded by an own classloader and are not part of the
classpath of the J2EE container. If the model changes, new classes are
created internally and a new classloader instance is used to load these
classes. The old instance of my own classloader will not be used
anymore. Therefore the old classes will not be used anymore. Is this
possible or will I face problems with the J2EE container?
Another question is the integration of persistence:
What I need is a persistence framework that can deal with this changing
of the classes at runtime. I thought that it might be possible with an
JDO implementation. As far as i understand, the PersistenceManager is
the central point of any JDO implementation and is responsible for
persisting objects. I wanted to use JDO with the JCA adapter inside a
J2EE application and provide the PersistenceManager with my own
classloader to provide the JDO implementation with the needed classes
that are created at runtime. The JDO specification defines that the
class should be loaded by a classForName method. Do you think it is
feasible (or possible) to change this method to use my own classloader
instead?
Thanks for your advice
Stefan
I am currently writing my master thesis about a customer relationship
management (CRM) system. The special thing about this component is that
the model (the way the CRM data is described) can be changed at runtime.
That means I do not have the model at compile time. I already posted
here to get general hints from you guys (sry don't know how to link to
the other news message, but the name was: Compile java sources inside
J2EE component)
I specified the component in more detail and am currently trying to
integrate a persistence layer to persist data. My approach is to create
classes at runtime that reflect the current model and use instances of
these classes to represent data entered according to this model.
The classes are loaded by an own classloader and are not part of the
classpath of the J2EE container. If the model changes, new classes are
created internally and a new classloader instance is used to load these
classes. The old instance of my own classloader will not be used
anymore. Therefore the old classes will not be used anymore. Is this
possible or will I face problems with the J2EE container?
Another question is the integration of persistence:
What I need is a persistence framework that can deal with this changing
of the classes at runtime. I thought that it might be possible with an
JDO implementation. As far as i understand, the PersistenceManager is
the central point of any JDO implementation and is responsible for
persisting objects. I wanted to use JDO with the JCA adapter inside a
J2EE application and provide the PersistenceManager with my own
classloader to provide the JDO implementation with the needed classes
that are created at runtime. The JDO specification defines that the
class should be loaded by a classForName method. Do you think it is
feasible (or possible) to change this method to use my own classloader
instead?
Thanks for your advice
Stefan