[Design the new POJO MicroContainer] - Re: setting managed property of type List
by alesj
Hmmm, looking at the MetaValueFactory.create(Object value) for value == List(Integer), this seems to be broken or at least the relevant information about element values gets lost.
This is what this method returns for non-empty Integer ArrayList.
| metaValue: org.jboss.metatype.api.values.MetaValue = {org.jboss.metatype.api.values.ArrayValueSupport@824}"ArrayMetaType{type=[Lorg.jboss.metatype.api.values.CompositeValue; dims=1 elementType=MutableCompositeMetaType{java.lang.Object}:[CompositeValueSupport: metaType=[MutableCompositeMetaType{java.lang.Object}] items=[], CompositeValueSupport: metaType=[MutableCompositeMetaType{java.lang.Object}] items=[]]"
| metaType: org.jboss.metatype.api.types.ArrayMetaType = {org.jboss.metatype.api.types.ArrayMetaType@829}"ArrayMetaType{type=[Lorg.jboss.metatype.api.values.CompositeValue; dims=1 elementType=MutableCompositeMetaType{java.lang.Object}"
| dimension: int = 1
| elementType: org.jboss.metatype.api.types.MetaType = {org.jboss.metatype.plugins.types.MutableCompositeMetaType@840}"MutableCompositeMetaType{java.lang.Object}"
| primitiveArray: boolean = false
| cachedHashCode: int = -2147483648
| cachedToString: java.lang.String = {java.lang.String@833}"ArrayMetaType{type=[Lorg.jboss.metatype.api.values.CompositeValue; dims=1 elementType=MutableCompositeMetaType{java.lang.Object}"
| className: java.lang.String = {java.lang.String@850}"[Lorg.jboss.metatype.api.values.CompositeValue;"
| description: java.lang.String = {java.lang.String@851}"1-dimension array of java.lang.Object"
| typeName: java.lang.String = {java.lang.String@852}"[Lorg.jboss.metatype.api.values.CompositeValue;"
| array: boolean = true
| value: java.lang.Object = {java.lang.Object[2]@830}
| [0] = {org.jboss.metatype.api.values.CompositeValueSupport@834}"CompositeValueSupport: metaType=[MutableCompositeMetaType{java.lang.Object}] items=[]"
| contents: java.util.SortedMap = {java.util.TreeMap@839} size = 0
| metaType: org.jboss.metatype.api.types.CompositeMetaType = {org.jboss.metatype.plugins.types.MutableCompositeMetaType@840}"MutableCompositeMetaType{java.lang.Object}"
| cachedHashCode: int = -2147483648
| [1] = {org.jboss.metatype.api.values.CompositeValueSupport@834}"CompositeValueSupport: metaType=[MutableCompositeMetaType{java.lang.Object}] items=[]"
| contents: java.util.SortedMap = {java.util.TreeMap@839} size = 0
| metaType: org.jboss.metatype.api.types.CompositeMetaType = {org.jboss.metatype.plugins.types.MutableCompositeMetaType@840}"MutableCompositeMetaType{java.lang.Object}"
| cachedHashCode: int = -2147483648
The problem is that Object is recognized as lists/arrays element type instead of Integer (runtime object doesn't carry generics info). Hence elements are Composite types instead of primitive number type.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111219#4111219
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111219
18 years, 4 months
[Design the new POJO MicroContainer] - setting managed property of type List
by alex.loubyansky@jboss.com
I couldn't find a test for it? The only test I found for ManagedProperty.setValue() is org.jboss.test.managed.mock.MockTest but it sets only Strings.
I have a property of type java.util.List and when I set it I get
java.lang.reflect.UndeclaredThrowableException
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.newArrayInstance(DefaultMetaValueFactory.java:654)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.internalUnwrap(DefaultMetaValueFactory.java:490)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.unwrap(DefaultMetaValueFactory.java:451)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.setValue(AbstractManagedObjectFactory.java:753)
| at org.jboss.managed.plugins.WritethroughManagedPropertyImpl.setValue(WritethroughManagedPropertyImpl.java:111)
| at org.jboss.resource.deployers.management.DsDataSourceTemplate.writeTemplate(DsDataSourceTemplate.java:159)
| at org.jboss.resource.deployers.management.DsDataSourceTemplate.applyTemplate(DsDataSourceTemplate.java:69)
| at org.jboss.profileservice.management.ManagementViewImpl.applyTemplate(ManagementViewImpl.java:550)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:56)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:771)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
| Caused by: java.lang.ClassCastException: ReflectClassInfoImpl(a)1bc6271{name=java.util.List} is not an array.
| at org.jboss.reflect.plugins.ClassInfoImpl.newArrayInstance(ClassInfoImpl.java:532)
| at org.jboss.reflect.spi.DelegateClassInfo.newArrayInstance(DelegateClassInfo.java:285)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.newArrayInstance(DefaultMetaValueFactory.java:650)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.internalUnwrap(DefaultMetaValueFactory.java:490)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.unwrap(DefaultMetaValueFactory.java:451)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.setValue(AbstractManagedObjectFactory.java:753)
| at org.jboss.managed.plugins.WritethroughManagedPropertyImpl.setValue(WritethroughManagedPropertyImpl.java:111)
| at org.jboss.resource.deployers.management.DsDataSourceTemplate.writeTemplate(DsDataSourceTemplate.java:159)
| at org.jboss.resource.deployers.management.DsDataSourceTemplate.applyTemplate(DsDataSourceTemplate.java:69)
| at org.jboss.profileservice.management.ManagementViewImpl.applyTemplate(ManagementViewImpl.java:550)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:56)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:771)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at AOPProxy$1.applyTemplate(AOPProxy$1.java)
| at org.jboss.test.profileservice.test.ProfileServiceUnitTestCase.testAddXADataSource(ProfileServiceUnitTestCase.java:430)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at AOPProxy$1.applyTemplate(AOPProxy$1.java)
| at org.jboss.test.profileservice.test.ProfileServiceUnitTestCase.testAddXADataSource(ProfileServiceUnitTestCase.java:430)
The code looks like
ManagedObjectFactory mof = ManagedObjectFactoryBuilder.create();
| ManagedConnectionFactoryDeploymentMetaData mcf = new XADataSourceDeploymentMetaData();
| ManagedObject cfMO = mof.initManagedObject(mcf, "DataSource", "XA");
| ManagedProperty dsProp = cfMO.getProperty("xa-datasource-properties");
| dsProp.setValue(arrayList);
|
|
| @ManagementObject(componentType=@ManagementComponent(type="DataSource",subtype="XA"))
| public class XADataSourceDeploymentMetaData extends DataSourceDeploymentMetaData
| {
| ....
| @ManagementProperty(name="xa-datasource-properties", description="The DataSource properties", managed=true)
| public List<XAConnectionPropertyMetaData> getXADataSourceProperties()
| {
| return this.xaDataSourceProperties;
| }
You can see the real testcase in the stacktrace.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111164#4111164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111164
18 years, 4 months
[Design of JBoss jBPM] - Re: Reporting Engine Integration
by fady.matar
Apologies for the late reply and thanks for the feedback. I'll highlight things in here pretty quickly.
BAM Vs BI:
The ultimate question of Business Intelligence Vs Business Activity Monitoring narrows down to this differentiation: BAM addresses real-time data while BI addresses historical data. BAM & BI are focusing on two different business problems; BAM is focusing on a quick response to immediate changing condition affecting the work environment while BI focuses on the analysis of historical data that can help enhancing the future operations. I hope all of us agree on this so that we proceed further with the discussions.
Reporting Framework:
I'm absolutely agnostic to the reporting tool, our selection must make sure that the reporting framework can perform or can be extended to perform the following:
1.Provide an easy for business analysts to design their reports.
2.Provide all business graphs (Pivot tables, clean charts (2D-3D) that can help visualizing trends and differences of values.
3.Provide an approach of easily querying the underlying jBPM database to extract those values.
Reports:
The solution must provide a set of basic reports that are embedded by default. However, we must ensure that the solution provides deployable report-templates into the system. Those report templates must be easily designed and fine-grained at the UI level. (Must be able to decorate / enhance the UI) and should be generated in a number of formats, HTML, CSV, PDF, and Office compatible files.
Dashboards:
the BAM solution is based on dashboards and auto-refreshing AJAX panel components that would auto-update to reflect the real-time data.
The BAM Database
The jBPM database is not optimized for querying and reporting. One alternative would be to create an OLAP-enabled database out of the jBPM database to enable end-users to perform ad hoc analysis of data in multiple dimensions, thereby providing the insight and understanding they need for better decision making. Ideally I would like to use Hibernate to build the BAM queries however I think this must be integrated with the reporting framework, a factor we need to take into account while evaluating the reporting frameworks.
What do you guys say?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111139#4111139
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111139
18 years, 4 months
[Design of JBoss jBPM] - Re: Reporting Engine Integration
by camunda
I agree, that first the requirements should be somehow collected. Reporting can be a pain in the ass in my experiences...
In the simulation engine I added reports to show simulation results, there I use JasperReports (basiclly due to the fact, that I knew that much better myseld, so main evaluation criteria was Team Know-How ;-)), so this is already in the list of jBPM dependencies (if you want to use simulation reports).
Pentaho is a very cool tool. I like expecially the OLAP stuff (Mondrian and the JPivot browser), you give the business analyst powerful easy to use tools. But the main problem here is to design the underlaying database layout / OLAP Cubes.
If that is the goal of BAM (which I would say IS a part of BI) in jBPM, I would also start with these stuff first, and then select a reporting engine...
About one year ago, we chose Jasper for a project, because support for MDX connections and Cross-Tab-Support was much better in Jasper...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111126#4111126
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111126
18 years, 4 months