dan benanav wrote: > > Now another important requirement is inheritance. I now want to define > something called ACNode and TRNode. ACNode inherits from ANode and > defines a number of new methods and TRNode inherits from TNode and > defines a number of new methods. From there I will inherit from TRNodes > and ACNodes to define many new classes. A PGraph will often end up > containing mixture of several types of TRNodes and ACNodes > (Polymorphism). > > Using traditional object oriented programming representing this problem > is easy and I can freely use inheritance and standard classes like > Vector, HashSet etc... I can also use inheritance and refer to other > objects without difficulty. > > The application I am considering needs to make the PGraph instances and > the ACNode and TRNode instances persistent. The method calls on > PGraph, ACNode and TRNode need to be synchronized since more than one > thread can call those methods at the same time. And of course the calls > will be remote calls. Adding those features will take take time. I may > also want to cache PGraphs and ACNodes and TRNodes for efficiency. That > is where EJB should help. But it seems that in order to achieve those > results I need to rethink the representations of PGraph, ACNodes and > TRNodes. It appears that I am no longer free to use classes like > Vector, HashSet etc.. Or if I choose to use those structures I will need > to do Bean Managed Persistence. And even in that case I don't think > this example will work correctly. For example, when I call getAnodes() > will I get a Collection of polymorphic types? That is essential for > this problem. > > Bottom line is that I am not sure that I shouldn't just implement the > persistence, caching and multi-threading issues myself, because the EJB > approach would force a different almost unnatural implementation and > representation of the problem. > > How about it? Can anyone come up with an EJB (1.0 or 1.1) approach to > this problem? ---> An object-database integration with app-servers ..... allows you to address such problems. The choices would be to use session-beans .... to access the set of java classes (that have been marked as persistent) ..... or to use container managed peristence for entity beans .... where the entity bean can delegate persistent data access to a Java class. cheers, Nipun > > > dan > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff EJB-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
