Adrian Brock wrote:
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>(a)org.jboss.naming.JNDI(binding="/foo/bar",
remotable="true", remoteInterfaces={...})</annotation>
Hehe, remotable is also an aspect. :-)
For example I could remote it via Remoting2, Remoting3, Agnostic, RMI, etc.
The binding name in the end determines the remoting protocol.
More importantly it also determines local v.s. remote semantics of a
call. e.g. pass by ref or pass by value.
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 :-)
So you don't want to suddenly change the call semantic.
That's why I would rather see it stacked, in the likes of:
@JNDI(binding="/foo/bar", interfaces={...})
@JNDIFacade(binding="/foo/bar2", factory=Remoting2Factory.class,
interfaces={...}, delegateBinding="/foo/bar")
(needs work to make it more friendly)
or in EJB3 style:
@JNDI("bean/endpoint")
@Local(MyInterface.class)
@LocalBinding(jndiBinding="bean/local")
@Remote(MyRemoteInterface.class)
@RemoteBinding(factory="SomeFactory", jndiBinding="bean/remote")
> 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.
- must have an empty constructor
- all fields must be serializable
- should not do anything funky during construction
Basically all limitations of a no-interface EJB 3.1 view, which is only
usable locally.
So while true that it doesn't an interface, in practice I don't
recommend a no-interface approach.
Carlo
> 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-...
>>>>
>>>>
>>> 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(a)lists.jboss.org
>>>>
https://lists.jboss.org/mailman/listinfo/jboss-development
>>>>
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/jboss-development
>>
> _______________________________________________
> jboss-development mailing list
> jboss-development(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/jboss-development
>