Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #24574
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2013-07-01 22:05 -0700 |
| References | <2ra62cF15p1p2U1@uni-berlin.de> |
| Message-ID | <d5ad97e6-5ef8-4b13-a6a7-8c312e4c377d@googlegroups.com> (permalink) |
| Subject | Re: Using own classloader inside J2EE to load and unload own classes. |
| From | abhishek.khuntia@gmail.com |
On Tuesday, September 21, 2004 1:41:54 PM UTC+5:30, Stefan Siegl wrote: > 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 Hi Stefan, This is a old mail chain. I hope you have found a solution :) If so can you share with me ? I have a similar problem to load/unload set of classes when needed in a j2ee environment. I am looking at osgi and implementing it inside the business logic. Is there any other way ? Thanks, Abhishek
Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread
Re: Using own classloader inside J2EE to load and unload own classes. abhishek.khuntia@gmail.com - 2013-07-01 22:05 -0700
csiph-web