I'm creating a custom component, and I'd like this component triggers on SUBJOB_OK, but despite I've added the connectors to the Component Descriptor XML file (in fact, I've copied them from tMySQLConnection), the option does not appear in the componente menu:
<CONNECTORS>
<CONNECTOR CTYPE="FLOW" MAX_INPUT="0" MAX_OUTPUT="0"/>
<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="0" MAX_INPUT="1"/>
<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1"/>
<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1"/>
<CONNECTOR CTYPE="COMPONENT_OK"/>
<CONNECTOR CTYPE="COMPONENT_ERROR"/>
<CONNECTOR CTYPE="RUN_IF"/>
</CONNECTORS>
These are the only triggers I'm able to see:
Any hints? Thanks!
The problem was, as #tobi6 suggested, the component was not "startable" (this is a property to be set in the Component Descriptor XML file).
Related
I would like to set in the WildFly/JBoss ejb3 subsystem enable-graceful-txn-shutdown to true.
Tried two approaches:
<subsystem xmlns="urn:jboss:domain:ejb3:4.0" enable-graceful-txn-shutdown="true">
and
<subsystem xmlns="urn:jboss:domain:ejb3:4.0">
<enable-graceful-txn-shutdown value="true"/>
Both times I got a Validation error in standalone.xml:
'enable-graceful-txn-shutdown' isn't an allowed attribute for the
'subsystem'
element 'enable-graceful-txn-shutdown' isn't an allowed
element here
What is the right place?
Your subsystem tag's namespace is incorrect, enable-graceful-txn-shutdown isn't defined in urn:jboss:domain:ejb3:4.0 but in urn:jboss:domain:ejb3:5.0 (which is new in Wildfly 11).
If you check the XSD defining this namespace (which can be found in the docs/schema dir of your wildfly install, in this case as the wildfly-ejb3_3_5_0.xsd file), you'll find as Omoro pointed out that this tag should be at the root of your subsystem with a value boolean attribute, i.e.
<subsystem xmlns="urn:jboss:domain:ejb3:5.0">
<enable-graceful-txn-shutdown value="true"/>
Using the activemq jms for queue mechanism, I would like to monitor my queue for example the size of the queue. And i am using Jolokia as the bridge to perform rest requests on JMX.
Queue is configured in the wildfly and works fine:
<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
<server name="default">
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
...
</http-connector>
<http-acceptor name="http-acceptor" http-listener="default"/>
...
</http-acceptor>
<jms-queue name="QueueName" entries="java:/jms/queue/QueueName"/>
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
</server>
</subsystem>
I have deployed Jolokia war file on wildfly under deployments and the following url brings me a list of attributes:
localhost:8080/jolokia/list
Now i would like to read information about my queue, so i use the following rest request:
localhost:8080/jolokia/read/org.apache.activemq.artemis:module=JMS,type=Queue,name=*QueueName*
However, this throws back the following exception:
"stacktrace": "javax.management.InstanceNotFoundException: No MBean with pattern org.apache.activemq.artemis:module=JMS,type=Queue,name=*QueueName* found for reading attributes\n\tat org.jolokia.handler.ReadHandler.searchMBeans(ReadHandler.java:160)\n\tat org.jolokia.handler.ReadHandler.fetchAttributesForMBeanPattern(ReadHandler.java:126)\n\tat org.jolokia.handler.ReadHandler.doHandleRequest(ReadHandler.java:116)\n\tat org.jolokia.handler.ReadHandler.doHandleRequest(ReadHandler.java:37)\n\tat org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:161)\n\tat org.jolokia.backend.MBeanServerHandler
I have tried to enable the jmx in standalone by adding the jmx subsystem as following:
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
<remoting-connector use-management-endpoint="false"/>
</subsystem>
<connector socket-binding="jmx-remote" name="jmx-remote-connector" security- realm="ApplicationRealm"/>
<socket-binding name="jmx-remote" port="${jboss.jmx.port:7909}" fixed-port="false"/>
But it still does not work. Any help regarding the corrections for my approach or an alternative approach would be appreciated.
If *QueueName* contains a / it needs to be escaped using !/. For example jms/inputq must be converted to jms!/inputq.
If you want to avoid the escaping you can use a query parameter q. The url then ends up looking like /jolokia?p=/read/....
For more information about escaping, see https://jolokia.org/reference/html/protocol.html
I have created a bounded-queue-thread-pool in Jboss 7.2.0 standalone.xml as follows:
<subsystem xmlns="urn:jboss:domain:threads:1.1">
<bounded-queue-thread-pool name="myThreadPool">
<core-threads count="6000"/>
<queue-length count="1000"/>
<max-threads count="6000"/>
<keepalive-time time="60" unit="seconds"/>
</bounded-queue-thread-pool>
</subsystem>
After that I am using this as executor in AJP connectors as follows:
<connector name="conn1" protocol="AJP/1.3" scheme="http" socket-binding="conn1" enabled="true" max-post-size="0" executor="myThreadPool" max-connections="2000"/>
<connector name="conn2" protocol="AJP/1.3" scheme="http" socket-binding="conn2" enabled="true" executor="myThreadPool" max-connections="2000"/>
<connector name="conn3" protocol="AJP/1.3" scheme="http" socket-binding="conn3" enabled="true" executor="myThreadPool" max-connections="2000"/>
At the end the socket binding for 3 connectors:
<socket-binding name="conn1" port="15007"/>
<socket-binding name="conn2" port="15008"/>
<socket-binding name="conn3" port="15009"/>
When I start jboss and create multiple http requests, each request thread is created as myThreadPool-threads-1, myThreadPool-threads-2 etc. However when I shutdown jboss using command line, these threads are not getting terminated. Here is the command I use to shutdown:
%JBOSS_HOME%\bin\jboss-cli.bat --connect controller=10.10.54.85:9999 --commands=:shutdown
Due to this, the java process of jboss-AS is not getting killed. However when I simply remove the executor from connector, the java process is terminated successfully. Can someone suggest me how to terminated all the threads of threadPool when server is shutdown?
Probably this bug is a cause of your problem, a workaround is set:
org.apache.coyote.ajp.DEFAULT_CONNECTION_TIMEOUT
Add the following to your system-properties in your host.xml, standalone.xml or domain.xml:
<system-properties>
<property name="org.apache.coyote.ajp.DEFAULT_CONNECTION_TIMEOUT" value="600000"/>
<system-properties>
this works except if we continuously send request to the server.
See also: server hang during shutdown when specifying executor in connector
I cannot seem to get configuring port-offsets via properties file on the domain managed setup to start multiple server instances in a server group.
I have the following configuration in host.xml:
<servers>
<server name="instance-one" group="main-server-group" auto-start="true">
<socket-bindings port-offset="${jboss.instance1.offset}"/>
</server>
<server name="instance-two" group="main-server-group" auto-start="true">
<!-- server-two avoids port conflicts by incrementing the ports in
the default socket-group declared in the server-group -->
<socket-bindings port-offset="${jboss.instance2.offset}"/>
</server>
</servers>
The properties are configured via properties file (custom-domain.properties):
jboss.domain.base.dir=custom-domain
jboss.instance1.offset=10300
jboss.instance2.offset=20300
And I try to startup the domain using
./domain.sh -P=custom-domain.properties
The problem is that jboss.instance1.offset and jboss.instance2.offset are not being applied to the corresponding properties in host.xml. If I have hardcoded values in the host.xml it appears to start up instance 1 and instance 2 on the hardcoded port offsets.
Does custom property configuration not work in domain setup?
Thanks for any help.
Can I dump a properties file somewhere in one of the JBoss 6 directories, and pick it up from the classpath?
Or even better, does anybody know the mechanism behind a configuration file like $JBOSS_HOME/server/default/deploy/jboss-logging.xml? Changes to this file seem to trigger an event, so that a running instance can process the modifications (without having to bounce the AS).
A possibility is to configure SystemPropertiesService in ./conf/jboss-service.xml.
This allows you to configure system properties in-place, or load them from a properties file:
<server>
<mbean code="org.jboss.varia.property.SystemPropertiesService"
name="jboss.util:type=Service,name=SystemProperties">
<!-- Load properties from each of the given comma seperated URLs -->
<attribute name="URLList">
http://somehost/some-location.properties,
./conf/somelocal.properties
</attribute>
<!-- Set propertuies using the properties file style. -->
<attribute name="Properties">
property1=This is the value of my property
property2=This is the value of my other property
</attribute>
</mbean>
</server>
For more details, refer to: http://docs.jboss.org/jbossas/admindevel326/html/ch10.html
They have made this even easier in JBoss EAP 6 (AS 7).
Pass Property File as Startup Parameter
This can be added within the main start up script or passed as parameter
./standalone.sh --properties=/Users/john.galt/dev/config/ds/jboss.properties
If these properties are read, they will be rendered in the server log as the first statement.
3:58:41,633 DEBUG [org.jboss.as.config] (MSC service thread 1-6) Configured system properties:
DSsettings.password = password
DSsettings.user-name = admin
DSsettings.connection-url = jdbc:oracle:fat:#activedb:1521:DEV
[Standalone] =
awt.nativeDoubleBuffering = true
NOTE: As these settings are logged in server log, ensure no clear text passwords are in the property files in production
Use passed in system properties
You could use these system properties with following syntax.
Example Usage in a data source file
<xa-datasource jndi-name="java:jboss/ds" pool-name="cPool" jta="true" enabled="true" use-ccm="true">
<xa-datasource-property name="URL">
${DSsettings.connection_url}
</xa-datasource-property>
<driver>oracle</driver>
...
<security>
<user-name>${DSsettings.user-name}</user-name>
<password>${DSsettings.password}</password>
</security>
...
</xa-datasource>
In JBoss 6 use: ./deploy/properties-service.xml
On JBoss AS7 properties-service.xml no longer exist, the below is the solution:
http://www.mastertheboss.com/jboss-server/jboss-configuration/how-to-inject-system-properties-into-jboss