[jboss-jira] [JBoss JIRA] (WFLY-10835) Connection factory with discovery-group doesn't work
ehsavoie Hugonnet (JIRA)
issues at jboss.org
Thu Aug 16 08:31:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-10835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13619990#comment-13619990 ]
ehsavoie Hugonnet edited comment on WFLY-10835 at 8/16/18 8:30 AM:
-------------------------------------------------------------------
This is due to the following Artemis code in org.apache.activemq.artemis.uri.JGroupsSchema
@Override
protected URI internalNewURI(ActiveMQConnectionFactory bean) throws Exception {
DiscoveryGroupConfiguration dgc = bean.getDiscoveryGroupConfiguration();
BroadcastEndpointFactory endpoint = dgc.getBroadcastEndpointFactory();
String auth;
if (endpoint instanceof JGroupsFileBroadcastEndpointFactory) {
auth = ((JGroupsFileBroadcastEndpointFactory) endpoint).getChannelName();
} else if (endpoint instanceof JGroupsPropertiesBroadcastEndpointFactory) {
auth = ((JGroupsPropertiesBroadcastEndpointFactory) endpoint).getChannelName();
} else {
throw new NotSerializableException(endpoint + "not serializable");
}
String query = BeanSupport.getData(null, bean, dgc, endpoint);
dgc.setBroadcastEndpointFactory(endpoint);
return new URI(SchemaConstants.JGROUPS, null, auth, -1, null, query, null);
}
as CommandDispatcherBroadcastEndpointFactory doesn't extend JGroupsFileBroadcastEndpointFactory nor JGroupsPropertiesBroadcastEndpointFactory.
[~pferraro], what's your opiniopn on this ?
was (Author: ehugonnet):
This is due toi the following Artemis code in org.apache.activemq.artemis.uri.JGroupsSchema
@Override
protected URI internalNewURI(ActiveMQConnectionFactory bean) throws Exception {
DiscoveryGroupConfiguration dgc = bean.getDiscoveryGroupConfiguration();
BroadcastEndpointFactory endpoint = dgc.getBroadcastEndpointFactory();
String auth;
if (endpoint instanceof JGroupsFileBroadcastEndpointFactory) {
auth = ((JGroupsFileBroadcastEndpointFactory) endpoint).getChannelName();
} else if (endpoint instanceof JGroupsPropertiesBroadcastEndpointFactory) {
auth = ((JGroupsPropertiesBroadcastEndpointFactory) endpoint).getChannelName();
} else {
throw new NotSerializableException(endpoint + "not serializable");
}
String query = BeanSupport.getData(null, bean, dgc, endpoint);
dgc.setBroadcastEndpointFactory(endpoint);
return new URI(SchemaConstants.JGROUPS, null, auth, -1, null, query, null);
}
as CommandDispatcherBroadcastEndpointFactory doesn't extend JGroupsFileBroadcastEndpointFactory nor JGroupsPropertiesBroadcastEndpointFactory.
[~pferraro], what's your opiniopn on this ?
> Connection factory with discovery-group doesn't work
> ----------------------------------------------------
>
> Key: WFLY-10835
> URL: https://issues.jboss.org/browse/WFLY-10835
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Affects Versions: 13.0.0.Final
> Reporter: Martin Styk
> Assignee: ehsavoie Hugonnet
> Priority: Critical
> Attachments: firefox.desktop, server-trace.log, standalone-full-ha.xml
>
>
> Jms client can not use remote connection factory defined as follows
> {noformat}
> <discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/>
> <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" discovery-group="dg-group1" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
> {noformat}
> Following exception is thrown on client
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: javax.naming.CommunicationException: WFNAM00020: Remote naming operation failed [Root exception is java.io.EOFException: Read past end of file]
> at client.ProducerJms11.sendMessages(ProducerJms11.java:67)
> at client.Producer.run(Producer.java:34)
> at client.Producer.sendAllSync(Producer.java:25)
> at client.ProducerJms11.main(ProducerJms11.java:14)
> Caused by: javax.naming.CommunicationException: WFNAM00020: Remote naming operation failed [Root exception is java.io.EOFException: Read past end of file]
> at org.wildfly.naming.client.remote.RemoteClientTransport.lookup(RemoteClientTransport.java:261)
> at org.wildfly.naming.client.remote.RemoteContext.lambda$lookupNative$0(RemoteContext.java:190)
> at org.wildfly.naming.client.NamingProvider.performExceptionAction(NamingProvider.java:222)
> at org.wildfly.naming.client.remote.RemoteContext.performWithRetry(RemoteContext.java:100)
> at org.wildfly.naming.client.remote.RemoteContext.lookupNative(RemoteContext.java:188)
> at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:74)
> at org.wildfly.naming.client.store.RelativeFederatingContext.lookupNative(RelativeFederatingContext.java:58)
> at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:74)
> at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:60)
> at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:66)
> at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)
> at javax.naming.InitialContext.lookup(InitialContext.java:417)
> at client.ProducerJms11.sendMessages(ProducerJms11.java:43)
> ... 3 more
> Caused by: java.io.EOFException: Read past end of file
> at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:151)
> at org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:294)
> at org.jboss.marshalling.SimpleDataInput.readUnsignedByte(SimpleDataInput.java:249)
> at org.jboss.marshalling.river.BlockUnmarshaller.readUnsignedByte(BlockUnmarshaller.java:258)
> at org.jboss.marshalling.river.BlockUnmarshaller.readInt(BlockUnmarshaller.java:296)
> at org.jboss.marshalling.river.BlockUnmarshaller.readUTF(BlockUnmarshaller.java:326)
> at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.readExternal(ActiveMQConnectionFactory.java:186)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1414)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205)
> at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
> at org.wildfly.naming.client.remote.RemoteClientTransport.lookup(RemoteClientTransport.java:243)
> ... 15 more
> Caused by: an exception which occurred:
> in object of type org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory
> {noformat}
> It fails on attempt to look up RemoteCF
> {noformat}
> ConnectionFactory connectionFactory = (ConnectionFactory) namingContext.lookup(ClientDefaults.CONNECTION_FACTORY);
> {noformat}
> Same scenario with connector works well.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list