You can do that already with a normal context.
You can nuke any context and all children go away.
The reason I am using this, is because my JNDI names for JMS queues are
deep. And when a queue gets undeployed, I think we shouldn't leave the
parent contexts sitting around for no reason.
But yes, my unbind function does indeed remove the specified name, and
all subcontexts.
On Wed, 28 Nov 2001, Scott M Stark wrote:
>
> This doesn't sound too useful unless given:
> > A/B/C/val1
> > A/B/C/val2
> > A/D/val3
>
> I can do Util.unbind("A") to wipe out A and its entire tree in one
> call similar to rm -rf on a directory. If that is what you indicating
> then its a useful option.
>
> xxxxxxxxxxxxxxxxxxxxxxxx
> Scott Stark
> Chief Technology Officer
> JBoss Group, LLC
> xxxxxxxxxxxxxxxxxxxxxxxx
> ----- Original Message -----
> From: "David Budworth" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, November 28, 2001 12:39 PM
> Subject: [JBoss-dev] org.jboss.naming.Util feature question
>
>
> > I was just wondering if anyone would like org.jboss.naming.Util to have
> > an unbind feature.
> >
> > Unbinding by hand is easy enough, but I need (and am using in a subclass
> > of Util for my own project) the ability to make unbind remove the
> > intermediate contexts if they are empty.
> >
> > ie:
> >
> > A/B/C/val1
> > A/B/C/val2
> > A/D/val3
> >
> > unbind(A/B/C/val1)
> >
> > would only remove "val1" from the A/B/C context
> >
> > then doing unbind(A/B/C/val2) // after you already unbound val1
> >
> > wiht remove val2, C, B contexts (but not A since it had more than one
> > subcontext)
> >
> >
> > I'd like to add this to the Util class, but wasn't sure if anyone else
> > thought it was usefull, or what it should be called. I call mine
> > "unbind", because it's the opposite of bind() which creates subctx.
> >
> > But the unweary may not realize that it nukes intermediates. So maybe
> > call it unbindTree ?
> >
> > -David
> >
> > p.s. Do people normally just add stuff and wait for someone to complain?
> > If so, I'll stop posting questions about these little mods, and just
> > implement them, and fix em if someone bitches.
> >
> >
> >
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development