[Design of JBoss jBPM] - task updates
by tom.baeyens@jboss.com
hi alejandro,
i've done some work to refactor the task component:
1) i've unified the resource loading of wire bindings and other resources in task component as i did previously in pvm and other components (nothing to worry about)
2) i've extracted variables and timers from pvm ExecutionImpl into a new ScopeInstanceImpl class. Now ExecutionImpl and TaskImpl both inherit from ScopeInstanceImpl. That way the strategy to deal with variables and timers is unified/leveraged between executions and tasks.
The clue will be to map the variables and timers in the task entity with a join-table.
In case the task component is not used, that means that the task mappings are not included. That should not change the schema of the PVM tables. Suppose that you would map the variables and timers related to a task without a join-table, then this would result in an extra column in the JBPM_VARIABLE and JBPM_JOB tables. That column would disappear in case the task mappings are not present.
So all of this is to make sure that the PVM schema remains as is when we add/remove optional components like the task component.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193693#4193693
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193693
16 years, 1 month
[Design of EJB 3.0] - Re: BeanContainer.getAnnotation returning the old value
by ALRubinger
Proposed patch:
Index: src/main/java/org/jboss/metadata/annotation/creator/ejb/jboss/RolesAllowedProcessor.java
| ===================================================================
| --- src/main/java/org/jboss/metadata/annotation/creator/ejb/jboss/RolesAllowedProcessor.java (revision 81835)
| +++ src/main/java/org/jboss/metadata/annotation/creator/ejb/jboss/RolesAllowedProcessor.java (working copy)
| @@ -73,6 +73,29 @@
| methods = new MethodsMetaData();
| perm.setMethods(methods);
| }
| +
| + /*
| + * JBMETA-152
| + *
| + * Check that we haven't already defined permissions for this method
| + */
| + MethodPermissionsMetaData permissions = metaData.getMethodPermissionsByEjbName(ejbName);
| + if (permissions != null)
| + {
| + for (MethodPermissionMetaData permission : permissions)
| + {
| + for (MethodMetaData methodMetaDataInPermissions : permission.getMethods())
| + {
| + // If this method's already been added
| + if (methodMetaDataInPermissions.equals(mmd))
| + {
| + // Do nothing
| + return;
| + }
| + }
| + }
| + }
| +
| HashSet<String> roles = new HashSet<String>();
| for(String role : allowed.value())
| roles.add(role);
Makes for expected output in "security5" tests:
03:40:31,934 WARN [Ejb3DescriptorHandler] Adding @RolesAllowed for method echo([java.lang.String]) of EJB FirstBean: [InternalRole]
| 03:40:32,108 WARN [Ejb3DescriptorHandler] Adding @RolesAllowed for method *(null) of EJB SecondBean: [InternalRole]
| 03:40:32,169 WARN [Ejb3DescriptorHandler] Adding @RolesAllowed for method echo([java.lang.String]) of EJB SimpleStatelessBean: [EchoSLSB]
| 03:40:32,308 WARN [Ejb3DescriptorHandler] Adding @RolesAllowed for method echo([java.lang.String]) of EJB SimpleStatefulBean: [EchoSFSB]
...though the tests still fail. :(
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193676#4193676
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193676
16 years, 1 month
[Design of POJO Server] - Re: MetaValue representation of javax.management.ObjectNames
by scott.stark@jboss.org
There is a testcase in managed that illustrates the MetaMapper(ObjectName) implementations that were added:
| import javax.management.ObjectName;
|
| import org.jboss.managed.api.annotation.ManagementObject;
| import org.jboss.managed.api.annotation.ManagementProperty;
| import org.jboss.metatype.api.annotations.MetaMapping;
| import org.jboss.metatype.api.annotations.MetaMappingFactory;
| import org.jboss.metatype.plugins.values.mappers.ObjectNameMetaMapper;
| import org.jboss.metatype.plugins.values.mappers.ObjectNameMetaMapperFactory;
| import org.jboss.metatype.plugins.values.mappers.PropertiesObjectNameMetaMapper;
| import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
|
| @ManagementObject
| public class ObjectNameBean
| {
| private ObjectName nameAsString;
| private ObjectName nameAsComposite;
| private ObjectName nameAsCompositeFixedKeys;
| private ObjectName nameAsProperties;
|
| @ManagementProperty()
| @MetaMapping(StringObjectNameMetaMapper.class)
| public ObjectName getNameAsString()
| {
| return nameAsString;
| }
| public void setNameAsString(ObjectName nameAsString)
| {
| this.nameAsString = nameAsString;
| }
|
| @ManagementProperty()
| @MetaMapping(ObjectNameMetaMapper.class)
| public ObjectName getNameAsComposite()
| {
| return nameAsComposite;
| }
| public void setNameAsComposite(ObjectName nameAsComposite)
| {
| this.nameAsComposite = nameAsComposite;
| }
|
| @ManagementProperty()
| @MetaMapping(PropertiesObjectNameMetaMapper.class)
| public ObjectName getNameAsProperties()
| {
| return nameAsProperties;
| }
| public void setNameAsProperties(ObjectName nameAsProperties)
| {
| this.nameAsProperties = nameAsProperties;
| }
| @ManagementProperty()
| @MetaMappingFactory(value=ObjectNameMetaMapperFactory.class, args={"key1", "The first key", "key2", "The second key"})
| public ObjectName getNameAsCompositeFixedKeys()
| {
| return nameAsCompositeFixedKeys;
| }
| public void setNameAsCompositeFixedKeys(ObjectName nameAsCompositeFixedKeys)
| {
| this.nameAsCompositeFixedKeys = nameAsCompositeFixedKeys;
| }
| }
|
ObjectNameMetaMapper - exposes the ObjectName as a MutableCompositeMetaType
PropertiesObjectNameMetaMapper - expose the ObjectName as a PropertiesMetaType
StringObjectNameMetaMapper - exposes the ObjectName as a SimpleMetaType.STRING
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193659#4193659
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193659
16 years, 1 month