Hi Arash!

answers inside:

--- Arash Rajaeeyan <[email protected]> schrieb am Fr, 13.3.2009:

> Von: Arash Rajaeeyan <[email protected]>
> Betreff: Re: @Resource handling
> An: [email protected]
> Datum: Freitag, 13. März 2009, 11:11
> Hi Mark,
> 
> 
> correct me if I am wrong.
> 
> as 2009-01-22 the new name for web-beans is "Java Contexts
> and Dependency
> Injection"

Yes, but I _personally_ still prefer the term WebBeans or JSR-299 :)

> 
> JNDI is a mechanism for naming and discovery of Java
> Objects in a
> distributed system.
> it lets components (complex heavy objects) to be discovered
> with a mechanism
> other than their Java Class name or Java Object pointer.
> 
> since lots of systems are not distributed and run on single
> JVM, that
> distributed java objects parts makes no sense.
> but:
> in DI frameworks like Seam and Spring a component can be
> given an alias name
> other than it's class name.
you can also name contextual beans via annotation and even via XML. The class 
(or member) name is only the default name.


> now if a developer wants to move from SE to EE (for example
> he may use SE
> for unit test, and EE for deployment, or current project
> size may not
> justify EE environment)
> changing the names may become painful if they need to be
> changed.
> if some naming mechanism compatible with EJB 3.1 JNDI names
> are used, it may
> help this change.

JNDI is usually not as fast. And you can do all this with contextual beans 
without using JNDI, isn't? Even more you can also run it in environments where 
no or only a read-only JNDI context is available


> putting objects in JNDI directory is not neccessary, but a
> a place for them
> on JNDI tree, (when program is deployed in EE) may be very
> usefull.

@Gurkan, may one solve this by writing an Interceptor which puts beans into the 
JNDI context based on its name? For which contexts would this be possible?

LieGrue,
strub
> 
> Regards
> Arash Rajaeeyan
> 
> 
> On Fri, Mar 13, 2009 at 12:40 PM, Mark Struberg <[email protected]>
> wrote:
> 
> >
> > Hi Arash!
> >
> > Currently the spec imho only says that the Manager has
> to be exposed via
> > JNDI.
> >
> > I personally don't see the benefit if we add all
> things to JNDI but I'm not
> > a big EJB wizard. Why do you like to have it? Can you
> give us a sample where
> > it would be an advantage?
> >
> > txs and LieGrue,
> > strub
> >
> > --- Arash Rajaeeyan <[email protected]>
> schrieb am Fr, 13.3.2009:
> >
> > > Von: Arash Rajaeeyan <[email protected]>
> > > Betreff: Re: @Resource handling
> > > An: [email protected]
> > > Datum: Freitag, 13. März 2009, 10:03
> > > can we assume ordinary java objects
> > > also have a place on JNDI tree?
> > > just as EJB 3.1 components names have become
> standard?
> > > that's some thing we can propose to be added
> web-beans
> > > (Java Dependency
> > > Injection) standard.
> > >
> > >
> > > On Fri, Mar 13, 2009 at 12:30 PM, Matthias
> Wessendorf
> > > <[email protected]>wrote:
> > >
> > > > On Thu, Mar 12, 2009 at 10:34 PM, Mark
> Struberg <[email protected]>
> > > wrote:
> > > > >
> > > > > Hi!
> > > > >
> > > > > The (EJB centric) Spec of @Resource
> says that the
> > > resource will always be
> > > > looked up via JNDI [1]. I guess mainly
> because the
> > > whole J2EE stuff is
> > > > really JNDI centric.
> > > > >
> > > > > Otoh in environments where no or only a
> read-only
> > > JNDI context is
> > > > available, do we like to allow @Resouce
> also?
> > > >
> > > > I think, that I'd go for it
> > > >
> > > > -M
> > > >
> > > > > I know this feature from Spring and I
> must say I
> > > love it. You can simply
> > > > write a Bean and inject it via @Resource
> even without
> > > JNDI, So for Spring
> > > > @Resource is > more or less an alias for
> @Autowired
> > > (which is ~ our
> > > > @Current)
> > > > >
> > > > > I'm not really sure how to interpret
> the section
> > > 5.12.1 of the spec.
> > > > >
> > > > > LieGrue,
> > > > > strub
> > > > >
> > > > > [1]
> > http://java.sun.com/javaee/5/docs/api/javax/annotation/Resource.html
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > >
> > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > sessions: http://www.slideshare.net/mwessendorf
> > > > twitter: http://twitter.com/mwessendorf
> > > >
> > >
> > >
> > >
> > > --
> > > Arash Rajaeeyan
> > >
> >
> >
> >
> >
> 
> 
> -- 
> Arash Rajaeeyan
> 



Reply via email to