[Design of POJO Server] - Re: Weird SimpleValueSupport instance
by alesj
Cause:
| 2007-10-10 16:42:50,750 DEBUG [org.jboss.system.deployers.managed.ServiceMetaDataICF] Failed to get property value for bean: org.jboss.resource.connectionmanager.JBossManagedConnectionPool, property: minSize
| java.lang.IllegalArgumentException: Value and metatype are differ in type: SimpleMetaType:java.lang.Integer:5
| at org.jboss.metatype.api.values.SimpleValueSupport.setValue(SimpleValueSupport.java:102)
| at org.jboss.metatype.api.values.SimpleValueSupport.<init>(SimpleValueSupport.java:75)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.createSimpleValue(DefaultMetaValueFactory.java:129)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.internalCreate(DefaultMetaValueFactory.java:492)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.create(DefaultMetaValueFactory.java:442)
| at org.jboss.system.deployers.managed.ServiceMetaDataICF.getValue(ServiceMetaDataICF.java:121)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateValues(AbstractManagedObjectFactory.java:605)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateManagedObject(AbstractManagedObjectFactory.java:525)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.initManagedObject(AbstractManagedObjectFactory.java:171)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.getValue(AbstractManagedObjectFactory.java:695)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateValues(AbstractManagedObjectFactory.java:605)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateManagedObject(AbstractManagedObjectFactory.java:525)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.initManagedObject(AbstractManagedObjectFactory.java:171)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.build(AbstractParsingDeployerWithOutput.java:290)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.build(DeployerWrapper.java:202)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.getManagedObjects(DeployersImpl.java:339)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.getManagedObjects(MainDeployerImpl.java:458)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.getManagedDeployment(MainDeployerImpl.java:432)
| at org.jboss.profileservice.management.ManagementViewImpl.loadProfile(ManagementViewImpl.java:164)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| 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:769)
| 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)
| 2007-10-10 16:42:50,750 DEBUG [org.jboss.system.deployers.managed.ServiceMetaDataICF] Failed to get property value for bean: org.jboss.resource.connectionmanager.JBossManagedConnectionPool, property: maxSize
| java.lang.IllegalArgumentException: Value and metatype are differ in type: SimpleMetaType:java.lang.Integer:20
| at org.jboss.metatype.api.values.SimpleValueSupport.setValue(SimpleValueSupport.java:102)
| at org.jboss.metatype.api.values.SimpleValueSupport.<init>(SimpleValueSupport.java:75)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.createSimpleValue(DefaultMetaValueFactory.java:129)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.internalCreate(DefaultMetaValueFactory.java:492)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.create(DefaultMetaValueFactory.java:442)
| at org.jboss.system.deployers.managed.ServiceMetaDataICF.getValue(ServiceMetaDataICF.java:121)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateValues(AbstractManagedObjectFactory.java:605)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateManagedObject(AbstractManagedObjectFactory.java:525)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.initManagedObject(AbstractManagedObjectFactory.java:171)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.getValue(AbstractManagedObjectFactory.java:695)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateValues(AbstractManagedObjectFactory.java:605)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateManagedObject(AbstractManagedObjectFactory.java:525)
| at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.initManagedObject(AbstractManagedObjectFactory.java:171)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.build(AbstractParsingDeployerWithOutput.java:290)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.build(DeployerWrapper.java:202)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.getManagedObjects(DeployersImpl.java:339)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.getManagedObjects(MainDeployerImpl.java:458)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.getManagedDeployment(MainDeployerImpl.java:432)
| at org.jboss.profileservice.management.ManagementViewImpl.loadProfile(ManagementViewImpl.java:164)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| 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:769)
| 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)
|
Which makes sense with the following code
| @Override
| public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
| {
| List<ServiceAttributeMetaData> poolAttributes = new ArrayList<ServiceAttributeMetaData>();
| ServiceAttributeMetaData poolAttribute = null;
|
| poolAttribute = buildSimpleAttribute("PoolJndiName", md.getJndiName());
| poolAttributes.add(poolAttribute);
|
| poolAttribute = buildSimpleAttribute("MinSize", String.valueOf(md.getMinSize()));
| poolAttributes.add(poolAttribute);
|
| poolAttribute = buildSimpleAttribute("MaxSize", String.valueOf(md.getMaxSize()));
| poolAttributes.add(poolAttribute);
|
and
| if (metaType.isSimple())
| result = createSimpleValue((SimpleMetaType<Serializable>) metaType, (Serializable) value);
|
At which point to fix this?
Or is this expected behaviour?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093530#4093530
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093530
18 years, 6 months
[Design of JCA on JBoss] - DeploymentInfo/Template MCF
by weston.price@jboss.com
In working on this, I just want to make sure there is something I am not missing.
Currently what I consider to be a simple mapping from the DeploymentTemplateInfo to the ManagedConnectionFactoryDeploymentGroup (the group of JCA deployments) involves simply reading the available managed properties and mapping them onto the relevant JCA MetaData
Example:
|
| public ManagedConnectionFactoryDeploymentGroup buildDeploymentGroup(ManagedConnectionFactoryDeploymentGroup group, DeploymentTemplateInfo info)
| {
|
| Map<String, ManagedProperty> props = info.getProperties();
| ManagedConnectionFactoryDeploymentMetaData md = new ManagedConnectionFactoryDeploymentMetaData();
|
| Set<String> names = props.keySet();
|
| for (String string : names)
| {
| ManagedProperty prop = props.get(string);
|
| if(prop.getName().equals("jndi-name"))
| {
| md.setJndiName((String)prop.getValue());
| }
| }
|
| group.addManagedConnectionFactoryDeployment(md);
| return group;
|
|
What I am wondering is if this is something I should be doing, or are we working towards an automapping of the TemplateInfo to the relevant MetaData based on the annotation model. I am fine with doing this as described above and then refactoring later, but it would seem that this should be a core component that handles this for the deployer/metadata developer.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093527#4093527
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093527
18 years, 6 months
[Design of JBossXB] - Re: @XmlElementWrapper/@XmlElements
by scott.stark@jboss.org
I don't see that you can make a meanignful distinction between these two fragments:
| <!-- XML Schema fragment -->
| <xs:complexType name="Foo">
| <xs:sequence>
| <xs:element name="bar" minOccurs="1" maxOccurs="unbounded">
| <xs:complexType>
| <xs:choice minOccurs="0" maxOccurs="unbounded">
| <xs:element name="A" type="PX"/>
| <xs:element name="B" type="PY"/>
| </xs:choice>
| </xs:complexType>
| </xs:element>
| </xs:sequence>
| </xs:complexType>
|
| <!-- XML Schema fragment -->
| <xs:complexType name="Foo">
| <xs:sequence>
| <xs:element name="bar" minOccurs="1" maxOccurs="unbounded">
| <xs:complexType>
| <xs:choice minOccurs="0" maxOccurs="1">
| <xs:element name="A" type="xs:string"/>
| <xs:element name="B" type="xs:string"/>
| </xs:choice>
| </xs:complexType>
| </xs:element>
| </xs:sequence>
| </xs:complexType>
|
both accept:
| <foo>
| <bar>
| <A />
| </bar>
| <bar>
| <B />
| </bar>
| <bar>
| <A />
| </bar>
| </foo>
|
and since the @XmlElementWrapper should be flattening out the bar elements to its children, both end up with a List of the choice elements.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093502#4093502
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093502
18 years, 6 months
[Design of POJO Server] - Weird SimpleValueSupport instance
by alesj
I stumbled upon this weird SimpleValueSupport instance:
| value: java.lang.Object = {org.jboss.metatype.api.values.SimpleValueSupport@8630}"SimpleMetaType:java.lang.Integer:5"
| metaType: org.jboss.metatype.api.types.SimpleMetaType = {org.jboss.metatype.api.types.SimpleMetaType@8638}"SimpleMetaType:java.lang.Integer"
| cachedHashCode: int = -2056817302
| cachedToString: java.lang.String = {java.lang.String@8873}"SimpleMetaType:java.lang.Integer"
| className: java.lang.String = {java.lang.String@8874}"java.lang.Integer"
| description: java.lang.String = {java.lang.String@8874}"java.lang.Integer"
| typeName: java.lang.String = {java.lang.String@8874}"java.lang.Integer"
| array: boolean = false
| value: java.io.Serializable = {java.lang.String@8872}"5"
|
MetaType == Integer, value == String.
Which again introduces CCE. ;-(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093496#4093496
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093496
18 years, 6 months