[Design of JBoss jBPM] - expression or execute
by pete.muir@jboss.org
Hi
If you are using Seam with JBPM you end up with different syntax for executing actions uising EL:
Seam's pages.xml
<page>
| <action execute="#{foo.bar}" />
| </page>
Seam's components.xml
<event>
| <action execute="#{foo.bar}" />
| </event>
(actually currently its
components.xml
<event>
| <action expression="#{foo.bar}" />
| </event>
but we are planning to deprecate this)
.jpdl.xml
<action expression="#{foo.bar}"/>
We (Seam dev) feel that execute is a better word as expression is what it is, whilst execute is what it does. In particular you can use expressions inside other attributes (e.g. condition="#{foo.isBar}" or actor-id="#{foo.actor}").
But I also think consistency is very important, so we am hoping that we can get execute as an alias to expression available in JPDL (best would be to deprecate expression I think). What do you guys think? A possibility?
http://jira.jboss.com/jira/browse/JBSEAM-1775
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080849#4080849
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080849
17 years, 7 months
[Design the new POJO MicroContainer] - Re: Annotation processing
by adrian@jboss.org
"alesj" wrote :
| What's the difference between local and non-local retrievers (from MetaDataContext):
|
| | /**
| | * Get the retrievals
| | *
| | * @return the retrievals
| | */
| | List<MetaDataRetrieval> getRetrievals();
| |
| | /**
| | * Get the local retrievals
| | *
| | * @return the local retrievals
| | */
| | List<MetaDataRetrieval> getLocalRetrievals();
| |
|
| A MetaDataContext is made of local retrievals and a parent context.
| retrievals = local + parent retrievals.
|
| anonymous wrote :
| | Any quick tips on how MetaData.hasInstanceMetaData() should look like?
| | Should it still use MetaDataContext as current impl in AOPConstructorJoinpoint does?
|
| Just move the AOP alogrithm into the MetaData/bridge.
| i.e. see whether the backing MetaDataContext has an INSTANCE scope
| and whether that scope has local annotations or metadata.
|
| A more complete api would be to allow
| MetaData.getScopeMetaData(ScopeKey)
| which would produce a MetaData backed by the local retrievals of that scope
| and add an isEmpty() to the MetaData api.
|
| The hasInstanceMetaData() could then be implemented as:
|
| | MetaData instance = getScopedMetaData(instanceScope);
| | return instance.isEmpty();
| |
| making it redundant.
|
| But that might be a bit more complicated to implement with the caching, etc.?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080801#4080801
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080801
17 years, 7 months
[Design the new POJO MicroContainer] - Re: Annotation processing
by alesj
"alesj" wrote :
| "adrian(a)jboss.org" wrote :
| | Also the BasicBeanAdapter and related classes need fixing such that they use the MetaData not the MetaDataRetrieval.
| |
| | The same is true of its usage in the Scoping.
| |
| MetaData has all the required functionality - as MetaDataRetrieval?
|
| Scoping as in PreInstall stuff that we did?
|
Yup, it was easy to move annotations handling to plain MetaData lookup. :-)
I also (re)moved the part in PreInstallAction where MetaDataRetrieval was referenced from KernelMetaDataRepository.
But I guess this code cannot be changed to use plain MetaData since I _need_ to build the whole MetaDataRetrieval for the scope - similar to how we do it for ControllerContext's MetaData (hidden in BasicKernelMetaDataRepository).
| // find scoped controller
| MutableMetaDataRepository mmdr = repository.getMetaDataRepository();
| MetaDataRetrieval mdr = mmdr.getMetaDataRetrieval(scopeKey);
| if (mdr == null)
| {
| mdr = new MemoryMetaDataLoader(scopeKey);
| mmdr.addMetaDataRetrieval(mdr);
| }
| MetaDataItem<ScopedKernelController> controllerItem = mdr.retrieveMetaData(ScopedKernelController.class);
| ScopedKernelController scopedController;
| if (controllerItem != null)
| {
| scopedController = controllerItem.getValue();
| }
| else
| {
| AbstractController parentController = null;
| ScopeKey parentKey = scopeKey.getParent();
| while (parentController == null && parentKey != null)
| {
| MetaDataRetrieval pmdr = mmdr.getMetaDataRetrieval(parentKey);
| if (pmdr != null)
| {
| MetaDataItem<ScopedKernelController> pci = pmdr.retrieveMetaData(ScopedKernelController.class);
| if (pci != null)
| {
| parentController = pci.getValue();
| }
| }
| parentKey = parentKey.getParent();
| }
| if (parentController == null)
| {
| if (controller instanceof AbstractController == false)
| throw new IllegalArgumentException("Underlying controller not AbstractController instance!");
| parentController = (AbstractController) controller;
| }
| scopedController = new ScopedKernelController(controller.getKernel(), parentController);
| ((MutableMetaData)mdr).addMetaData(scopedController, ScopedKernelController.class);
| }
| scopedController.addControllerContext(context);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080779#4080779
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080779
17 years, 7 months