[JBoss AS 7 Development] - connecting a remote hornetQ server
by Hans Steiner
Hans Steiner [https://community.jboss.org/people/hans-juergen.stemmer.vkb.de] created the discussion
"connecting a remote hornetQ server"
To view the discussion, visit: https://community.jboss.org/message/729620#729620
--------------------------------------------------------------
Hi out there
I am trying to connect a jboss as 7.1.0 with another jboss that should only act as a hornetQ server (2.2.11).
I see that in the ejb subsystem
<mdb>
<resource-adapter-ref resource-adapter-name="*hornetq-ra"*/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
is configured.
In the message subsystem I use a connector
<connectors>
<connector name="*netty*">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="xxxxx"/>
<param key="port" value="5745"/>
</connector>
</connectors>
that is referenced from the connection pool
<pooled-connection-factory name="*hornetq-ra*">
<transaction mode="xa"/>
<connectors>
<connector-ref connector-name="*netty*"/>
</connectors>
<entries>
<entry name="java:/JmsXA"/>
</entries>
</pooled-connection-factory>
All this works fine, except of an error/warning I receive a few seconds after I have started the server.
> 15:54:20,640 WARN [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] Can't connect to any hornetq server on recovery [XARecoveryConfig [hornetQConnectionFactory=HornetQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5745&host=xxxxx], discoveryGroupConfiguration=null], clientID=null, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false], *username=null, password=null*]]
> 15:54:20,656 WARN [com.arjuna.ats.jta] ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: Error trying to connect to any providers for xa recovery
> at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:275) [hornetq-jms-2.2.11.Final.jar:]
> at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.recover(HornetQXAResourceWrapper.java:77) [hornetq-jms-2.2.11.Final.jar:]
> at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecovery(XARecoveryModule.java:503) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:471) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:385) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:166) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-4.16.2.Final.jar:]
> at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-4.16.2.Final.jar:]
> Caused by: HornetQException[errorCode=2 message=null]
> at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.connect(HornetQXAResourceWrapper.java:351) [hornetq-jms-2.2.11.Final.jar:]
> at org.hornetq.jms.server.recovery.HornetQXAResourceWrapper.getDelegate(HornetQXAResourceWrapper.java:251) [hornetq-jms-2.2.11.Final.jar:]
> ... 7 more
>
> 15:54:20,703 WARN [org.hornetq.jms.server.recovery.HornetQXAResourceWrapper] Can't connect to any hornetq server on recovery [XARecoveryConfig [hornetQConnectionFactory=HornetQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5745&host=xxxxx], discoveryGroupConfiguration=null], clientID=null, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false], username=null, password=null]]
The queue is found and I can send and receive messages. I use annotations like this
@MessageDriven(name="MyMDB", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "global/myQueue"),
@ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "guest")...
for the mdb.
Can anybody help me with the XA warning? I suppose all I have to do is to configure username and passwort in the right manner. I read something about ra.xml and the resource-adapters subsystem, but I could not find out how to set any properties.
Perhaps there is even a better way to combine a remote hornetQ server with the use of annotations. I am not happy having the messaging subsystem (not present in a standalone.xml without hornetq) in my configuration. Can I delete some portions just leaving the client-part of the jms configuration?
Thx very much for help.
hans
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/729620#729620]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM Development] - why jbpm5.3 usertask support only one incoming connection?
by gao haijun
gao haijun [https://community.jboss.org/people/vavi] created the discussion
"why jbpm5.3 usertask support only one incoming connection?"
To view the discussion, visit: https://community.jboss.org/message/741623#741623
--------------------------------------------------------------
I have a process, contains approve and reject. if reject,the process should return to usertask1.
if I write the process definition file using hand(without the eclipse plugin),it will throw a exception:
*ProcessLoadError: unable to parse xml : Exception class java.lang.IllegalArgumentException : This type of node cannot have more than one incoming connection!*
imo, what I said should be a *common request/case*.
so why jbpm5.3 usertask support only one incoming connection?
Hope someone can answer my question,thx a lot.
PS:the process difinition details:
<itemDefinition id="_conditionWhoItem" structureRef="Object" />
<itemDefinition id="_2-conditionWhoItem" structureRef="Object" />
<itemDefinition id="_4-conditionWhoItem" structureRef="Object" />
<itemDefinition id="_5-conditionWhoItem" structureRef="Object" />
<process processType="Private" isExecutable="true" id="com.sample.bpmn" name="Sample Process" tns:packageName="defaultPackage" >
<!-- process variables -->
<property id="conditionWho" itemSubjectRef="_conditionWhoItem"/>
<!-- nodes -->
<startEvent id="_1" name="StartProcess" />
<userTask id="_2" name="1" >
<ioSpecification>
<inputSet>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>FME</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<exclusiveGateway id="_3" name="Gateway" gatewayDirection="Diverging" />
<userTask id="_4" name="3" >
<ioSpecification>
<inputSet>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>SLE2</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<userTask id="_5" name="2" >
<ioSpecification>
<inputSet>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>SLE1</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<endEvent id="_6" name="End" >
<terminateEventDefinition/>
</endEvent>
<!-- connections -->
<sequenceFlow id="_5-_2" sourceRef="_5" targetRef="_2" />
<sequenceFlow id="_1-_2" sourceRef="_1" targetRef="_2" />
<sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3" />
<sequenceFlow id="_3-_4" sourceRef="_3" targetRef="_4" name="SLE2" >
<conditionExpression xsi:type="tFormalExpression" >return conditionWho == "SLE2";</conditionExpression>
</sequenceFlow>
<sequenceFlow id="_3-_5" sourceRef="_3" targetRef="_5" name="SLE1" >
<conditionExpression xsi:type="tFormalExpression" >return conditionWho == "SLE1";</conditionExpression>
</sequenceFlow>
<sequenceFlow id="_4-_6" sourceRef="_4" targetRef="_6" />
</process>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/741623#741623]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss AS 7 Development] - Re: CLI non-interactive mode improvements
by Alexey Loubyansky
Alexey Loubyansky [https://community.jboss.org/people/aloubyansky] created the discussion
"Re: CLI non-interactive mode improvements"
To view the discussion, visit: https://community.jboss.org/message/714239#714239
--------------------------------------------------------------
About the environment properties, makes sense. Although, I think it's a different issue from interactive value prompting.
While conditions and force are interesting features, you can achieve repeatable script executions by using batches which make a script an atomic action, i.e. everything in the script will be applied or rolled back.
The force in the suggested form (for operations especially) won't be implemented. For some commands, perhaps. In general, though, I, personally, don't like the idea... but I see your point. Conditions are interesting.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/714239#714239]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months