dev@genericjmsra.java.net

RE: [Issue 32] New - ObjectBuilder.setProperties fails for overloaded setter methods

From: William H. Woodward <wwoodward_at_proteus-technologies.com>
Date: Mon, 31 Mar 2008 09:57:25 -0400

Thanks for the reply,

Unfortunately that won't work. The problem is the iteration thru the
list of available methods in ObjectBuilder.setProperties finds
setSSLIdentity(byte[]) first; then tries to invoke it (in
MethodExecutor.runMethod) with a String parameter: String.getClass is
not the same as byte[]. Overriding the method has no effect since the
method signature remains the same.

(I tried it, even changed the order the methods appear; still failed.)

Thanks,
Bill

-----Original Message-----
From: Binod.Pg_at_Sun.COM [mailto:Binod.Pg_at_Sun.COM]
Sent: Monday, March 31, 2008 9:36 AM
To: wwoodward_at_dev.java.net
Cc: dev_at_genericjmsra.dev.java.net
Subject: Re: [Issue 32] New - ObjectBuilder.setProperties fails for
overloaded setter methods

Hi,

One quick work around will be to write a class that extends
TibJmsConnectionFactory and
override just these conflicting methods and use that as the connection
factory instead of
TibjmsConnectionFactory

We will think about some other options to fix it.....

thanks,
Binod.

On 31-Mar-08, at 6:12 PM, wwoodward_at_dev.java.net wrote:

> https://genericjmsra.dev.java.net/issues/show_bug.cgi?id=32
> Issue #|32
> Summary|ObjectBuilder.setProperties fails for
> overloaded sette
> |r methods
> Component|genericjmsra
> Version|current
> Platform|All
> OS/Version|All
> URL|
> Status|NEW
> Status whiteboard|
> Keywords|
> Resolution|
> Issue type|DEFECT
> Priority|P1
> Subcomponent|core
> Assigned to|binod
> Reported by|wwoodward
>
>
>
>
>
>
> ------- Additional comments from wwoodward_at_dev.java.net Mon Mar 31
> 12:42:45 +0000 2008 -------
> Tibco EMS TibjmsConnectionFactory overloads the setter methods for
> ServerURL:
> setSSLIdentity(String) and setSSLIdentity(byte[]).
> ObjectBuilder.setProperties
> finds the byte[] version first then tries to set a string parameter
> which cuases
> an IllegalArgumentException.
>
> My environment: Spring, Jencks, Tibco EMS, Java 5.
>
> My config:
> <bean id="genericRA" class="com.sun.genericra.GenericJMSRA">
> <property name="providerIntegrationMode" value="bean"/>
> <property name="supportsXA" value="false"/>
> <property name="topicConnectionFactoryClassName"
> value="com.tibco.tibjms.TibjmsTopicConnectionFactory"/>
> <property name="topicClassName"
> value="com.tibco.tibjms.TibjmsTopic"/>
> <property name="userName" value="admin"/>
> <property name="password" value="admin"/>
> <property name="connectionFactoryProperties"
>
> value="ServerUrl=ssl://SMD-WS000091:7243,SSLIdentity=conf/certs/
> client_identity.p12,SSLPassword=password,SSLTrustedCertificate=conf/
> certs/
> server_root
> .cert
> .pem
> ,SSLEnableVerifyHostName
> =true,SSLExpectedHostName=server,SSLTrace=true"/>
> <!-- property name="RMPolicy"
> value="OnePerPhysicalConnection"/-->
> </bean>