--- tm jee <[EMAIL PROTECTED]> wrote:

> Thx for the share of knowledge Konstantin. I'd need
> to read up about pico to be able to understand more.
> :)

http://www.picocontainer.org/5.1+Tutorials

to get overall idea.

For usage in web, you may look at my demo
( though this may need some dependency  tweaking to
compile, since I did not have looked after it for long
time ):

http://svn.picocontainer.codehaus.org/browse/picocontainer/java/demos/trunk/jtec


Look into nano-application.xml / nano-session.xml /
nano-request.xml - that where container buildup is
described ( there are several scripting options, from
compiled java class up to groovy scripts i you like ) 

Actions will receive dependencies from this conainer
chain, and could be registered explicitely to avoid
ambiguities. And they could be even registered in
session scope -> kind of "wizard" ( though it is
seldom necessary ) 


> Yup. Its pretty new. I think the codes are clean and
> very well written. I like the way it uses the
> Factory interface as callbacks The uses of generics.
> Separation of internal and external apis (eg.
> ExternalContext and Context / InternalContext,
> Factory vs InternalFactory ). The callbacks are
> nicely used. Nice extension like
> FinalizableReferenceQueue that does clean up upon
> gc. Use of adapters pattern  / transformer
> (hopefully i got this right)  like Function.
> Resolving cyclic dependncy using Proxy etc.  :)

While 1.5 features are nice,   my customers are not
yet ready to use them.  So, I have to live off 1.4.x
;)

> I see. I am more used to the "scope" because of
> Spring. Pico does have a interesting way of doing
> things. I guess its like a composite / chain kindof
> thing, but I'll need to read up about pico to
> understand more. ;)

Exactly. It's a chain of containers, and there is one
app scoped container per application,  one per session
and one per request. Or more in dedicated directories.


For example I use directory based containers  to 
fine tune security ( place component there, which
requires certain role and bombs otherwise  and this
directory and below is no longer accessible without it
) or to control my menu system
(
http://jtec.svn.sourceforge.net/viewvc/jtec/trunk/jtec-menu/
) - just place EntryActivator into directory container
and forget about it. ( and seethat whole system does
not know anything about servlets )


> I see, i guess its something like Spring's
> FactoryBean/ProxyFactoryBean. I guess in Guice, one
> could registor a custom factory using
> ContainerBuilder, but I might be totally wrong. :)

Yep, it's a kind of. But main difference between pico
& spring is that pico is just DI container and does
not pretend to be full J2EE app server. It's made to
be 
easily integrated.

regards,

----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org


 
____________________________________________________________________________________
Sponsored Link

$420k for $1,399/mo. 
Think You Pay Too Much For Your Mortgage? 
Find Out! www.LowerMyBills.com/lre

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to