[Beginner's Corner] - Externalizing resource adapter configs from standalone.xml in Jboss-as 7.1.1
by nav
nav [https://community.jboss.org/people/nav] created the discussion
"Externalizing resource adapter configs from standalone.xml in Jboss-as 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/820238#820238
--------------------------------------------------------------
Hi everyone
I'm using Jboss-as 7.1.1
I have configured the resource adapter as below in the standalone.xml file. This basically is the configuration for a outbound queue using Websphere MQ and it works fine.
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
wmq.jmsra.rar
</archive>
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:jboss/jms/MQConnectionFactory" enabled="true" use-java-context="false" pool-name="MqConnectionFactoryPool">
<config-property name="port">
3434
</config-property>
<config-property name="hostName">
myhost
</config-property>
<config-property name="channel">
CLIENT.TO.AUIHTA01
</config-property>
<config-property name="transportType">
CLIENT
</config-property>
<config-property name="queueManager">
AUIHTA01
</config-property>
</connection-definition>
</connection-definitions>
<admin-objects>
<admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/jms/MQOutboundQueue" enabled="true" use-java-context="false" pool-name="MyQueue1Pool">
<config-property name="baseQueueManagerName">
AUIHTA01
</config-property>
<config-property name="baseQueueName">
XX.CBO.OUT
</config-property>
</admin-object>
</admin-objects>
</resource-adapter>
</resource-adapters>
</subsystem>
My requirement is that I need to externalise the configs such as hostName, port etc. This is because I want to change it based on different environments such as development,QA,Live etc.
Basically I want to know if these parameters can be externalised to a file so that it can be incuded in my deployment war file or ear file.
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/820238#820238]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[jboss-as-maven-plugin] Deployment failed and was rolled back.
by Stefan Lecho
When I try to deploy my project with the JBoss AS Maven Plugin, I'm getting
the following error message: *Deployment failed and was rolled back*.
How can I get more information about the root cause of the failing
deployment ?
*JBoss AS*: v7.1.1.Final
*JBoss AS Maven Plugin*: v7.4.Final
*Stack trace*
[ERROR] Failed to execute goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.4.Final:deploy (default) on
project nova-application-core: Deployment failed and was rolled back. ->
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.jboss.as.plugins:jboss-as-maven-plugin:7.4.Final:deploy (default)
on project nova-application-core: Deployment failed and was rolled back.
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.jboss.as.plugin.common.DeploymentExecutionException:
Deployment failed and was rolled back.
at
org.jboss.as.plugin.deployment.standalone.StandaloneDeployment.execute(StandaloneDeployment.java:140)
at
org.jboss.as.plugin.deployment.AbstractDeployment.executeDeployment(AbstractDeployment.java:119)
at
org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:141)
at
org.jboss.as.plugin.deployment.AbstractAppDeployment.doExecute(AbstractAppDeployment.java:70)
at
org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:111)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
11 years, 5 months
[EJB3] - Re: EJB3 is slow when invoke with new transaction
by Kalaiselvam P
Kalaiselvam P [https://community.jboss.org/people/kalaiselvamp] created the discussion
"Re: EJB3 is slow when invoke with new transaction"
To view the discussion, visit: https://community.jboss.org/message/825198#825198
--------------------------------------------------------------
Time was taken when commit the transaction. (may due to heavy load in DB server)
2013-06-06 01:48:17,919 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (http-10.32.131.25-80-13) BasicAction::End() for action-id a208319:d48e:51aeeaba:1a03
2013-06-06 01:48:17,919 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (http-10.32.131.25-80-13) BasicAction::onePhaseCommit() for action-id a208319:d48e:51aeeaba:1a03
2013-06-06 01:48:17,919 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (http-10.32.131.25-80-13) LastResourceRecord::topLevelPrepare() for 0:0:0:1
*2013-06-06 01:48:18,686 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (http-10.32.131.25-80-13) LastResourceRecord::topLevelCommit() for 0:0:0:1*
http://anonsvn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_6_1_GA_CP... http://anonsvn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_6_1_GA_CP...
151 public int topLevelCommit ()
152 {
153 if (tsLogger.arjLogger.debugAllowed())
154 {
155 tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ABSTRACT_REC, "LastResourceRecord::topLevelCommit() for "
156 + order());
157 }
158
159 return TwoPhaseOutcome.FINISH_OK;
160 }
161
162 public int topLevelPrepare ()
163 {
164 if (tsLogger.arjLogger.debugAllowed())
165 {
166 tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ABSTRACT_REC, "LastResourceRecord::topLevelPrepare() for "
167 + order());
168 }
169
170 if ((_lro != null) && (_lro.commit() == TwoPhaseOutcome.FINISH_OK))
171 {
172 return TwoPhaseOutcome.PREPARE_OK;
173 }
174 else
175 return TwoPhaseOutcome.PREPARE_NOTOK;
176 }
*
*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/825198#825198]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[Snowdrop] - Re: EAP6.1/JBoss7 Snowdrop and Camel
by Tejas Mehta
Tejas Mehta [https://community.jboss.org/people/tmehta] created the discussion
"Re: EAP6.1/JBoss7 Snowdrop and Camel"
To view the discussion, visit: https://community.jboss.org/message/825030#825030
--------------------------------------------------------------
Could you try updating META-INF\*jboss-deployment-structure.xml:*
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.apache.camel.core">
<exports>
<include path="META-INF**"/>
<include path="org**"/>
</exports>
<imports>
<include path="META-INF**"/>
<include path="org**"/>
</imports>
</module>
<module name="org.apache.camel.spring">
<exports>
<include path="META-INF**"/>
<include path="org**"/>
</exports>
<imports>
<include path="META-INF**"/>
<include path="org**"/>
</imports>
</module>
</dependencies>
</deployment>
</jboss-deployment-structure>
*
*
The reason for the exports/imports is that JBoss generally doesn't export the META-INF directories and the spring xsd's are generally contained in those dirs.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/825030#825030]
Start a new discussion in Snowdrop at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[jBPM] - timer job issues when disposing session in embedded j2ee process
by umberto maguolo
umberto maguolo [https://community.jboss.org/people/umb71] created the discussion
"timer job issues when disposing session in embedded j2ee process"
To view the discussion, visit: https://community.jboss.org/message/824721#824721
--------------------------------------------------------------
Hi all,
i'm using jBPM 5.4, I have a knowledge session with a process instance in it, embebbed in an ejb with container managed transaction, the process definition has a timer intermediate event in it:
i'm using jpa persistence but the problem arises also with in memory session without persistence. I've utilized the CMTDisposeCommand class to register the synchronization with the transaction manager and implemented the afterCompletion method to be notified when the container finishes it's work committing the transaction; in the afterCompletion method i've utilized the DefaultProcessEventListener and implemented the afterProcessCompleted method so i can (at least i thought it was so) dispose my knowledge session at the end of all the process elaboration.
The problem is that the process is regularly terminated but it seams that the timer service sheduler is not aware of that fact neither that the session is disposed and it continuosly try to signal the timer event on the session. When i call the ksession.dispose, in the afterProcessCompleted method, i get the exception in the server console:
SEVERE: Error when executing timer job
java.lang.IllegalStateException: Illegal method call. This session was previously disposed.
at org.drools.reteoo.DisposedReteooWorkingMemory.getLastIdleTimestamp(DisposedReteooWorkingMemory.java:562)
at org.drools.impl.StatefulKnowledgeSessionImpl.getLastIdleTimestamp(StatefulKnowledgeSessionImpl.java:890)
at org.drools.persistence.SingleSessionCommandService$EndOperationListenerImpl.endOperation(SingleSessionCommandService.java:334)
at org.drools.common.AbstractWorkingMemory.endOperation(AbstractWorkingMemory.java:1365)
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1006)
at org.drools.impl.StatefulKnowledgeSessionImpl.executeQueuedActions(StatefulKnowledgeSessionImpl.java:866)
at org.jbpm.process.instance.event.DefaultSignalManager.signalEvent(DefaultSignalManager.java:90)
at org.jbpm.process.instance.timer.TimerManager$ProcessJob.execute(TimerManager.java:323)
at org.drools.time.SelfRemovalJob.execute(SelfRemovalJob.java:15)
at org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:51)
at org.drools.persistence.jpa.JpaTimerJobInstance.internalCall(JpaTimerJobInstance.java:43)
at org.drools.persistence.jpa.JDKCallableJobCommand.execute(JDKCallableJobCommand.java:20)
at org.drools.persistence.jpa.JDKCallableJobCommand.execute(JDKCallableJobCommand.java:6)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:34)
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:14)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
giu 25, 2013 11:46:41 AM org.drools.time.impl.DefaultTimerJobInstance call
WARNING: Unable to execute timer job!
java.lang.IllegalStateException: Illegal method call. This session was previously disposed.
at org.drools.reteoo.DisposedReteooWorkingMemory.getProcessInstance(DisposedReteooWorkingMemory.java:382)
at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:297)
at org.jbpm.process.instance.timer.TimerManager$ProcessJob.execute(TimerManager.java:335)
at org.drools.time.SelfRemovalJob.execute(SelfRemovalJob.java:15)
at org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:51)
at org.drools.persistence.jpa.JpaTimerJobInstance.internalCall(JpaTimerJobInstance.java:43)
at org.drools.persistence.jpa.JDKCallableJobCommand.execute(JDKCallableJobCommand.java:20)
at org.drools.persistence.jpa.JDKCallableJobCommand.execute(JDKCallableJobCommand.java:6)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:34)
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:14)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
I've also tried to cancel any TimerJobInstance in the TimerService prior to dispose the session but the problem is still present. Am i doing something wrong? Missing something? What is the correct way of disposing session with (terminated) timer events in it?
Thanks.
Umberto
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/824721#824721]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months