Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Pattern »

Re: recursion in an J2EE application

Igor Cunko

2003-07-25


> -----Original Message-----
> From: Rafal Kedziorski [mailto:rafcio@(protected)]
> private void deleteCategoryRecursive(Long caller_user_id, Integer
> mandant_id, Category_TreeLocal categoryTreeLocal, boolean delReference)
>          throws CategoryException {
>   if (has_childreen) {
>    Iterator childreenCatTreeIterator = ...;
>
>    while (childreenCatTreeIterator.hasNext()) {
>     deleteCategoryRecursive(caller_user_id, mandant_id,
> (Category_TreeLocal) childreenCatTreeIterator.next(), delReference);
>    }
>   }
>
>   removeCategory(categoryTreeLocal);
> }
>
> is the recursive way, a good way in an J2EE application?

2.0 container supports cascade delete, it looks applicable in your case.

Igor

====================================================================
Community Web Site (Core J2EE Patterns Catalog - Online Version):
http://java.sun.com/blueprints/corej2eepatterns
Getting Started (Beta Version):
http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/
Get the book:
http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing:
email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.