You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Vic <vi...@friendvu.com> on 2005/01/19 20:38:27 UTC
Re: [chain] catalog config - implementation
I looked at the implementation.
Is there a reason not to use JNDI there?
I am asking because I need to create a "global" pointer for
something(user's name on client side swing). Normally I would use
Singleton Factory. Chains implements it another way.
JNDI anyone? I think that's what I'll do.
tia,
V
Craig McClanahan wrote:
>To get the default catalog instance:
>
> Catalog catalog = CatalogFactory.getInstance().getCatalog();
>
>To get a catalog named "foo":
>
> Catalog catalog = CatalogFactory.getInstance().getCatalog("foo");
>
>
>
>>tia,
>>.V
>>
>>
>
>Craig
>
>
--
RiA-SoA w/JDNC <http://www.SandraSF.com> forums
- help develop a community
My blog <http://www.sandrasf.com/adminBlog>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [chain] catalog config - implementation
Posted by Craig McClanahan <cr...@gmail.com>.
On Wed, 19 Jan 2005 13:38:27 -0600, Vic <vi...@friendvu.com> wrote:
> I looked at the implementation.
> Is there a reason not to use JNDI there?
>
> I am asking because I need to create a "global" pointer for
> something(user's name on client side swing). Normally I would use
> Singleton Factory. Chains implements it another way.
>
> JNDI anyone? I think that's what I'll do.
Does "there" mean to find the configured Catalog instance? One could
certainly register the instances in a JNDI context (Chain doesn't care
how you access the instances; that's a detail buried in your
application) -- but Chain does already implement the singleton factory
pattern when you use CatalogFactory.getInstance().getCatalog(). Plus,
code that uses this will work either inside or outside a webapp with
no changes, even in standalone apps that don't define any JNDI
support.
Craig
>
> tia,
> V
>
> Craig McClanahan wrote:
>
> >To get the default catalog instance:
> >
> > Catalog catalog = CatalogFactory.getInstance().getCatalog();
> >
> >To get a catalog named "foo":
> >
> > Catalog catalog = CatalogFactory.getInstance().getCatalog("foo");
> >
> >
> >
> >>tia,
> >>.V
> >>
> >>
> >
> >Craig
> >
> >
>
> --
> RiA-SoA w/JDNC <http://www.SandraSF.com> forums
> - help develop a community
> My blog <http://www.sandrasf.com/adminBlog>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org