[infinispan-issues] [JBoss JIRA] (ISPN-4755) TransportConfigurationBuilder.read(...) assumes Transport instance has default constructor

Dan Berindei (JIRA) issues at jboss.org
Wed Oct 22 04:05:35 EDT 2014


    [ https://issues.jboss.org/browse/ISPN-4755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014110#comment-13014110 ] 

Dan Berindei commented on ISPN-4755:
------------------------------------

I wouldn't call it a bug, since we still have this disclaimer in the {{TransportConfigurationBuilder.transport(Transport)}} javadoc:

{noformat}
    * NOTE: Currently Infinispan will not use the object instance, but instead instantiate a new
    * instance of the class. Therefore, do not expect any state to survive, and provide a no-args
    * constructor to any instance. This will be resolved in Infinispan 5.2.0
{noformat}

TBH I would rather allow the user to inject a Channel than a Transport instance. Too bad the {{channelLookup}} property only allows you to inject a class as well.

> TransportConfigurationBuilder.read(...) assumes Transport instance has default constructor
> ------------------------------------------------------------------------------------------
>
>                 Key: ISPN-4755
>                 URL: https://issues.jboss.org/browse/ISPN-4755
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 7.0.0.Beta2
>            Reporter: Paul Ferraro
>
> While upgrading WildFly to Infinispan 7.0, I encountered an InstantiationException in a call to GlobalConfigurationBuilder.read(...).  The culprit is the following commit:
> https://github.com/infinispan/infinispan/commit/b6190774725ed38f67ee7787ac0478fe723cff51
> Specifically, during TransportConfigurationBuilder.read(...) a new Transport instance is constructed using the default constructor of the transport class.  However, the Transport object might not have a default constructor.  Such is the case with WildFly's ChannelTransport.
> See: https://github.com/wildfly/wildfly/blob/master/clustering/infinispan/src/main/java/org/jboss/as/clustering/infinispan/ChannelTransport.java



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the infinispan-issues mailing list