Marco, wg> -----Original Message----- wg> From: Marco Mistroni [mailto:[EMAIL PROTECTED] wg> Sent: Friday, May 20, 2005 2:10 PM wg> To: [email protected] wg> Subject: [castor-user] OT/ security wg> wg> wg> wg> Hello all, wg> I have couple of questions to ask about Castor & OR frameworks wg> in general wg> wg> wg> 1 - Here in my company we are using EJB mainly because it adds those wg> optional services (such as pooling, security and transactions).. wg> Now, I have played with few OR mapping tools (actually, wg> only castor & wg> hibernate), and I thought that you might know something wg> about security, wg> how is done in OR mapping frameworks.. wg> wg> Ok, with OR frameworks for sure the big delays of using EJBs are wg> reduced, and you could also use ObjectOriented features such as wg> inheritance, which is wg> Actually not done nicely in EJB (actually, it is not done at all..). wg> wg> But I have never heard about security in OR frameworks... only about wg> transactions & pooling. wg> wg> Where does security stands in OR framework? In EJb 4 example you can wg> declare via the descriptor who is allowed to do what on a certain wg> EJB/method. wg> wg> Am I right in assuming that security is a feature that must wg> be added by developers? In my view, no. Castor is - as you said yourself - an o/r mapper, or a persistence framework more generally. In my view, such security issues should be managed at another level. If you e.g. were to use Spring together with Castor JDO, you'd be using Spring's declarative transaction demarcation feature, and not deal with transactions programmatically anymore. If you don't like Spring, but prefer using an EJB container, use it's security features. But I quite honestly don't see a reason to add such functionality to Castor.
wg> wg> 2 - I need your opinion on a problem that we have here (and wg> it is due to wg> lack of inheritance in EJBs). wg> We have a table (called 'container') which contains..... containers wg> (bag, boxes, pallets, locations etc..), everything that can contain wg> something. wg> Now, all those containers represents an hierarchical structure, like wg> This wg> wg> Warehouse wg> --- location wg> ------- pallet wg> ------- box wg> -------- bag wg> ------- items. wg> wg> With EJB NOT supporting inheritance, we have prolems here, wg> because as wg> consequence of different operations, the whole tree wg> structure needs to wg> Be updated. wg> Not having inheritance means that we have to read the table wg> all the time wg> (because, for example, for searching parent of a container wg> we have to wg> search the whole table).. wg> wg> I remember having posted a similar question nearly 2 years wg> ago (when I wg> started my current work).. if it was possible, with Castor, wg> to 'create' wg> a hierarchical structure within same table. If I remember correctly, wg> part of solution was to override some methods in some wg> interfaces (don't wg> remember which one though)), but the final answer was that wg> it was not wg> possible to implement a hierarchical structure WITHIN same table.. wg> wg> Do you have any updates/feedbacks on that? Yes, and no. If you looked at Cstor's roadmap at http://jira.codehaus.org/browse/CASTOR, you'll see an issue about adding support for polymorphism to Castor. Now, iirc, this will enable you to build such extend hierarchies, whether stored in independent tables or not. If you wanted, download the preview release and give it a go. I am more than happy to assist you with any questions. wg> wg> Regards wg> marco wg> wg> wg> wg> ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

