[jboss-dev] On demand JCA and JTA for the web-profile

Adrian Brock abrock at redhat.com
Tue May 5 07:13:02 EDT 2009


On Tue, 2009-05-05 at 13:07 +0200, Carlo de Wolf wrote:
> Ales Justin wrote:
> > I'll have a crack at this.
> >
> > Adrian, what did you mean under:
> >
> > > * The abilitiy to make the object bound into jndi
> > > aop remoteable
> That path leads to the AOPDispatcher singleton and we don't want to have 
> singletons in MC.
> 

Its only a singleton within AOP. As long as the name used to bind
the remote object into the dispatcher is unique it doesn't matter.

> I would rather see the usage of ejb3-remoting2. Which can basically make 
> anything remotable.
> And bind not the remotable ref by itself, but rather a ref via 
> ObjectFactory and make the remotable ref reference that one. Then you've 
> solved the bind remotable MC into JNDI problem.

The actualy mechanism should be an implementation detail, 
if it is done properly.

The important part is that it should be an "aspect" not done 27
different ways in 27 different projects.

All you should have to do is something like:

<bean ...>
   <annoation>@org.jboss.naming.JNDI(binding="/foo/bar",
remotable="true", remoteInterfaces={...})</annotation>

The implementation detail is binding some lifecycle handler
to the @JNDI annotation. What it does can change as required
(including nothing if that's what you want :-)

> If you want to see a lazy MC bound into JNDI in action, see 
> ejb3-nointerface.
> 
> The most important thing and change is that you must have an interface 
> to make stuff remotable, which flies against the MC POJO model.
> 

That's not true of AOP remoting. It doesn't need an interface but
there are some less strict constraints, e.g. the class can't be final.

> Carlo
> >
> > > * The on-demand processing I described.
> >
> > You mean that the default ObjectFactory
> > takes OnDemand into an account?
> >
> > Adrian Brock wrote:
> >> On Fri, 2008-11-14 at 15:20 +0100, Ales Justin wrote:
> >>>> I want to provide an @JNDI annotation similar to the @JMX
> >>>> lifecycle to make this easier for developers.
> >>>>
> >>>> This will be important if we ever get around to
> >>>> changing our naming contexts to read-only since we
> >>>> can just change the @JNDI aspect to use the new
> >>>> mechansim for binding to jndi.
> >>> How does this compare with what we already have:
> >>>   - 
> >>> http://anonsvn.jboss.org/repos/jbossas/projects/microcontainer/trunk/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/aspects/jndi/ 
> >>>
> >>
> >> I didn't know it existed. :-)
> >>
> >> The obvious things that are missing is are:
> >>
> >> * The on-demand processing I described.
> >>
> >> * whether the object should be bound using the
> >> NonSerializableObjectFactory or can be bound directly.
> >>
> >> * What custom ObjectFactory should be used if the binding
> >> implements Referenceable
> >>
> >> * The abilitiy to make the object bound into jndi
> >> aop remoteable
> >>
> >>> _______________________________________________
> >>> jboss-development mailing list
> >>> jboss-development at lists.jboss.org
> >>> https://lists.jboss.org/mailman/listinfo/jboss-development
> > _______________________________________________
> > jboss-development mailing list
> > jboss-development at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/jboss-development
> 
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list