[JBoss AS 7 Development] - Systemt properties in operation parameter values and command arguments
by Alexey Loubyansky
Alexey Loubyansky [https://community.jboss.org/people/aloubyansky] created the document:
"Systemt properties in operation parameter values and command arguments"
To view the document, visit: https://community.jboss.org/docs/DOC-18726
--------------------------------------------------------------
It is allowed to pass in system properties as operation parameter and command argument values. By default, system properties will be resolved on the server side, not in the CLI JVM. Also, not every attribute in the management model supports system properties (or expressions), it depends on the specific resource and its management interface implementation.
You can change the default behaviour, though, and make the CLI resolve system properties in operation parameter and command argument values before the requests are sent to the controller. To do that, open the *jboss-cli.xml* (which is located in the server's bin directory) and set the value of *resolve-parameter-values* to *true*.
One of the use-cases when making the CLI resolve system properties is useful is when there is a CLI script file which executes a set of operations and commands parameters and arguments of which might change from one execution to another. In this case, instead of specific values operation parameters and command arguments in the file could contain system property names. And a separate properties file could define the properties. Then to run the script
./jboss-cli.sh --file=script.cli --properties=script.properties
On *Windows*, of course, the CLI launching script will be *jboss-cli.bat*.
--file argument value is a path pointing to the file containing a set of CLI operations and commands to be executed.
--properties argument value is a path pointing to the file containing property definitions referenced from the script file specified as --file argument value.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-18726]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 6 months
[JBoss AS 7 Development] - JBoss 7.1 Domain Mode Logging - configuring per instance log locations
by davidmac
davidmac [https://community.jboss.org/people/davidmac] created the discussion
"JBoss 7.1 Domain Mode Logging - configuring per instance log locations"
To view the discussion, visit: https://community.jboss.org/message/747493#747493
--------------------------------------------------------------
We have a security policy that requires the JBoss installation (in Linux) to be installed under /home/someuser, but that partition isn't very big so we need logging output to go somewhere under /var/log/*. So suppose we have 2 controlled server instances (S1 and S2) that live here (within the home directory):
jboss/domain/servers/S1
jboss/domain/servers/S2
With this setup (having not changed the logging config) we get these logs on the home partition:
jboss/domain/log/host-controller.log
jboss/domain/log/process-controller.log
jboss/domain/servers/S1/log/server.log
jboss/domain/servers/S1/log/boot.log
jboss/domain/servers/S2/log/server.log
jboss/domain/servers/S2/log/boot.log
We need to configure:
* Domain logs (jboss/domain/log/*) to go to /var/log/jboss.
* S1's logs (jboss/domain/servers/S1/log/*) to go to /var/log/S1
* S2's logs (jboss/domain/servers/S1/log/*) to go to /var/log/S2
It seems like some approach to setting jboss.server.log.dir in various scopes in the management console (or config file) would work but it isn't clear if they would conflict or get overridden properly. My assumption for dealing with S1 and S2 is to set the jboss.server.log.dir system property independently on each server configuration's system properties. Should that work?
How to set the location of the domain logs?
Or have you come up with a better approach or practice? (Eventually we want to log to a central logging location ala syslog appender or some such).
Note that we don't want to resort to using symlinks as that would complicate configuration management.
Thanks for any pointers.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/747493#747493]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[jBPM Development] - Outofmemory exception when using jbpm api
by roxy1987
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion
"Outofmemory exception when using jbpm api"
To view the discussion, visit: https://community.jboss.org/message/747364#747364
--------------------------------------------------------------
Hi,
Whenever I use Configuration object to create process engine, it takes up a huge amount of memory and is not getting dereferenced for garbage collection on exit. I am using custom configuration. The code is below. Please some one get me out of this pickle. It is really urgent and any help would be highly appreciated. Thanks.
public static Configuration getConfiguration()
{
org.hibernate.cfg.Configuration configuration = new org.hibernate.cfg.Configuration();
Configuration configuration2 = new Configuration();
try
{
configuration.configure("jbpm.hibernate.cfg.xml");
String encrpytedPassword= configuration.getProperty("hibernate.connection.password");
String decryptedPwd = Encrypt.decrypt(encrpytedPassword);
configuration.setProperty("hibernate.connection.password",decryptedPwd);
configuration2.setHibernateSessionFactory(configuration.buildSessionFactory());
encrpytedPassword = null; decryptedPwd = null;
} catch(Exception e)
{
CustomErrorHandler.handleException(e, "CustomConfig");
}
configuration = null;
return configuration2;
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/747364#747364]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[JBoss AS 7 Development] - Grails project on Jboss 7 Blocks logging
by David Pugh
David Pugh [https://community.jboss.org/people/thebravedave] created the discussion
"Grails project on Jboss 7 Blocks logging"
To view the discussion, visit: https://community.jboss.org/message/732536#732536
--------------------------------------------------------------
I have a grails project that I am attempting to get working correctly for my company. We had the project running smoothly on Jboss 4.2.3, but upgrading to Jboss 7 causes a problem. When I deploy the grails war with another ear project in the deployments folder of jboss 7, Jboss stops logging part way through the deploy. Both the grails war and the ear project deploy properly, but logging just doesn't work. Also even after deploy, when I run a webservice that is available from the ear project, the webservice method runs properly, but the logging I added to the webservice method doesn't show up in the logs. If I stop the server and remove the grails project and restart it and run the same webservice method all of the logging shows up, also all of the logging that was supposed to show up during deployment.
I'm not seeing any errors in the logs involving class loader issues. Please someone throw me a bone!
Sincerely,
David
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/732536#732536]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[JBoss ESB Development] - When MQ started, JBoss fails to auto connect
by forum khan
forum khan [https://community.jboss.org/people/forum.khan] created the discussion
"When MQ started, JBoss fails to auto connect"
To view the discussion, visit: https://community.jboss.org/message/747096#747096
--------------------------------------------------------------
Deployment of ESB fails when MQ is down by throwing the below exception. Once MQ is started then JBoss fails to identify the MQ. Inorder to identify the MQ, the JBOSS needs to be restarted.
Can anyone please let me know why JBoss is not able to auto connect to MQ, when MQ is started.
*Exception:*
Caused by: java.lang.RuntimeException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:CNN_Gateway@QM_MyQueue <18116198>
at org.jboss.soa.esb.listeners.jca.JBoss42ActivationBridge.activate(JBoss42ActivationBridge.java:146)
at org.jboss.soa.esb.listeners.jca.BaseJcaInflow.doStart(BaseJcaInflow.java:237)
at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.start(AbstractManagedLifecycle.java:173)
... 81 more
Caused by: javax.resource.spi.ResourceAdapterInternalException: com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager 'QM_MyQueue' with connection mode 'Client' and host name '1234.cloud.abc.com(8083)'. Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.
at com.ibm.mq.connector.ResourceAdapterConnectionPool.createNewPoolEntryNoWrapper(ResourceAdapterConnectionPool.java:593)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.allocateConnection(ResourceAdapterConnectionPool.java:330)
at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:453)
at org.jboss.resource.deployers.RARDeployment.endpointActivation(RARDeployment.java:330)
at org.jboss.resource.deployers.RARDeployment.internalInvoke(RARDeployment.java:284)
at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.soa.esb.listeners.jca.JBoss42ActivationBridge.activate(JBoss42ActivationBridge.java:141)
... 83 more
Caused by: com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager 'QM_MyQueue' with connection mode 'Client' and host name '1234.cloud.abc.com(8083)'. Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:496)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:236)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:440)
at com.ibm.msg.client.wmq.internal.WMQXAConnection.<init>(WMQXAConnection.java:70)
at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:190)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6453)
at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createProviderXAConnection(WMQXAConnectionFactory.java:102)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createXAConnectionInternal(JmsConnectionFactoryImpl.java:388)
at com.ibm.mq.jms.MQXAConnectionFactory.createXAConnection(MQXAConnectionFactory.java:129)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.initializeJMSConnection(ResourceAdapterConnectionPool.java:470)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.createNewPoolEntryNoWrapper(ResourceAdapterConnectionPool.java:588)
... 91 more
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').#
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223)
... 100 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2059;AMQ9204: Connection to host '1234.cloud.abc.com(8083)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2059;AMQ9213: A communications error for occurred. [1=java.net.ConnectException[Connection refused: connect],3=1234.cloud.abc.com]],3=1234.cloud.abc.com(8083),5=RemoteTCPConnection.connnectUsingLocalAddress]
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:2010)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1227)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:355)
... 99 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2059;AMQ9213: A communications error for occurred. [1=java.net.ConnectException[Connection refused: connect],3=1234.cloud.abc.com]
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:663)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:991)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect(RemoteConnection.java:1112)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection(RemoteConnectionPool.java:350)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1599)
... 101 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection$5.run(RemoteTCPConnection.java:650)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:643)
... 105 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/747096#747096]
Start a new discussion in JBoss ESB Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months