[Design the new POJO MicroContainer] - Re: Scoped beans deployment
by adrian@jboss.org
"bill.burke(a)jboss.com" wrote : Adrian, I'm not grokking here...
See the scoped metadata in org.jboss.metadata in the container project
and its integration with the MC which was discussed/done within the last
couple of months.
anonymous wrote :
|
|
|
|
| <bean name="bar/>
|
| </scope
|
|
That won't work because you define the scopes hierarchically
but also somewhat randomly (even without introducing session/thread/transaction/converstation/etc. :-)
e.g. You can have a bean scope
myapplication/mydeployment1/mybean1
myapplication/mydeployment1/mybean2
myapplication/mydeployment2/mybean1
But you also want to be able to define it in code, e.g. adding beans
to a subsystem scope which isn't part of a deployment but deployments
can be in that subsystem.
e.g. I know this part of the jca code goes in the jboss-jca subsystem scope
| @org.jboss.metadata.scope.Subsystem("jboss-jca")
| public class MyJCAImplementationObject {}
|
So it needs to be abitrary scope annotations against the bean
(and the deployment for convenience).
anonymous wrote :
| Kernel app= kernel.createScope("Application");
| Kernel session = app.createScope("session");
|
Yes, you need to be able to create a child kernel
see my point (1) in the first response,
but you also need to add it to the MetaData scope
otherwise how does somebody which kernel to use in an abitrary context.
That is the purpose of the MetaData/MetaDataStack.
NOTE: This is all very speculative since besides maintaining the
MetaDataRepository yourself in some code none of this exists.
i.e. there is nothing that says I want to deploy this metadata into this scope.
That is what I meant before when I said:
"Although I think a more general notion would come out of the work
we need to do to define scoped metadata".
The repository exists with all the plumbing, but there is nothing to fill it! :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008952#4008952
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008952
17 years, 11 months
[Design of EJB 3.0] - Re: Issues with passivation of nested SFSBs
by bstansberry@jboss.com
"bill.burke(a)jboss.com" wrote :
| At first, the parent SFSB owns all the children. If a child is "touched" by an invocation, it must ping the parent to replicate the whole tree: parent and all its children.
Easily encapsulated in the StatefulReplicationInterceptor.
anonymous wrote : If the parent is removed, a child is picked as the new "parent".
This will be lot of work, for I'm not sure what gain vs. leaving the old parent context in the cache, but marked "removed" and with refs to any unneeded state nulled out. You've got to:
1) Pick a child (ok, trivial)
2) Move the data to the child (not sure if there are any integration issues)
3) Add all of the parent's children to the new "semi-parent".
4) Notify all the children of the new semi-parent
5) Do a lookup of the ProxiedStatefulBeanContext of each of the children (no direct ref to it) and modify it to point to the new parent.
6) Replace the cached context for the new "semi-parent" so it's no longer a ProxiedStatefulBeanContext, but rather a regular one (otherwise any calls to the new parent will fail).
7) Replicate every affected context so the rest of the cluster knows what you did. Probably should do this in a tx.
anonymous wrote : As for your concurrency problem. I don't think we should code for this and document that that scenario is not supported. SFSBs are supposed to be used by one client, not multiple clients concurrently. This will make things easier IMO.
:-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008942#4008942
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008942
17 years, 11 months