[
https://issues.apache.org/jira/browse/GERONIMO-4131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613633#action_12613633
]
Jarek Gawor commented on GERONIMO-4131:
---------------------------------------
There are two main issues as I understand it:
1) First, the resource adapter class has multiple setters for the same property
and a getter for that property that returns a primitive type. The
ConnectorModuleBuilder.setUpDynamicGBean() sets up a dynamic gbean with
attribute types based on the return types of the getter methods and the
ConnectorModuleBuilder.getValue() tries to convert the property value specified
in the deployment descriptor into the value of expected type. Now, since the
expected type is a primitive type, the classLoader.loadClass fails. That
explains the initial "Could not load attribute class: type: int" error.
The simplest solution for this problem is to map all the primitive types into
their corresponding complex types.
2) The second problem, after fixing the first issue, is that connector
deployment might fail with "java.lang.ClassCastException" errors while setting
the attributes on the dynamic gbean. The problem is in
DynamicGBeanDelegate.java. It creates a separate propertyName->operation map
for all getters and all setters. The problem arises if there are multiple
setters for the same property. Only the last setter method discovered will be
stored in the setters map. So, when an attribute is being set (using the
setAttribute() method) a wrong setter method might be used for the value (type)
being passed. That explains the "java.lang.ClassCastException" errors.
The solution for that problem is to change DynamicGBeanDelegate.java to support
multiple setters and to pick the right setter based on the type of the value
passed in when setting an attribute on the dynamic gbean.
> Problems with WebSphere MQ RA deployment
> ----------------------------------------
>
> Key: GERONIMO-4131
> URL: https://issues.apache.org/jira/browse/GERONIMO-4131
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: connector
> Affects Versions: 2.0.1, 2.0.2, 2.1, 2.1.1, 2.1.2
> Reporter: Kevan Miller
> Assignee: Jarek Gawor
> Fix For: 2.1.2
>
>
> A user reported problems deploying an MQ RA on Geronimo. Looks like there are
> several problems.
> 1) we don't like config-property-name values in ra.xml to start with a lower
> case letter
> 2) our mechanism for introspecting the implementation classes (e.g.
> managedconnectionfactory-class) is not working properly. there can be
> multiple "set" methods taking different parameter types. This is leading to
> type-mismatches as we try to set attributes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.