Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | 6.x |
The InferenceAgent loads all configured schemas (XSDs) the first time it is used. The time required to load the schemas depends on the schema definition and the network connection. This is a serialized operation so that worker threads are blocked until all schemas are loaded into the Java heap when two or more worker threads perform an XPath or XSLT mapper operation.
Sample thread dump ($default.be.mt$.Thread.1 blocked because $default.be.mt$.Thread.2 loads the schema and currently performed an http operation to load an external referenced schema):
"$default.be.mt$.Thread.1" #30 daemon prio=5 os_prio=0 cpu=704.40ms elapsed=2296.66s tid=0x0000000003f49000 nid=0xde9a waiting for monitor entry [0x00007f36f63ec000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.tibco.be.functions.xpath.BESchemaComponentCacheManager.getTypedContext(SourceFile:272)
- waiting to lock <0x00000005b2e61b98> (a com.tibco.be.functions.xpath.BESchemaComponentCacheManager)
at com.tibco.be.functions.xpath.XSLT2Helper.doTransform(SourceFile:62)
at com.tibco.be.functions.object.ObjectHelper.updateInstance(SourceFile:264)
at com.tibco.be.functions.object.ObjectHelper.updateInstance2(SourceFile:162)
at be.gen.<RuleOrRuleFunctionURL>.queuedForPartner$queuedForPartner_a.execute(queuedForPartner.java:122)
at com.tibco.cep.kernel.core.rete.ReteWM.resolveConflict(SourceFile:401)
...
"$default.be.mt$.Thread.2" #31 daemon prio=5 os_prio=0 cpu=2275.25ms elapsed=2246.28s tid=0x00000000028a0800 nid=0xa75d runnable [0x00007f6ce13a3000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketConnect(java.base@11.0.7/Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(java.base@11.0.7/AbstractPlainSocketImpl.java:399)
- locked <0x0000000590bc4830> (a java.net.PlainSocketImpl)
at java.net.AbstractPlainSocketImpl.connectToAddress(java.base@11.0.7/AbstractPlainSocketImpl.java:242)
at java.net.AbstractPlainSocketImpl.connect(java.base@11.0.7/AbstractPlainSocketImpl.java:224)
at java.net.Socket.connect(java.base@11.0.7/Socket.java:608)
at java.net.Socket.connect(java.base@11.0.7/Socket.java:557)
at sun.net.NetworkClient.doConnect(java.base@11.0.7/NetworkClient.java:182)
at sun.net.www.http.HttpClient.openServer(java.base@11.0.7/HttpClient.java:474)
at sun.net.www.http.HttpClient.openServer(java.base@11.0.7/HttpClient.java:569)
- locked <0x0000000590bc48d0> (a sun.net.www.http.HttpClient)
at sun.net.www.http.HttpClient.<init>(java.base@11.0.7/HttpClient.java:242)
...
at com.tibco.be.functions.xpath.BESchemaComponentCacheManager.addSchemas(SourceFile:505)
at com.tibco.be.functions.xpath.BESchemaComponentCacheManager.a(SourceFile:301)
at com.tibco.be.functions.xpath.BESchemaComponentCacheManager.getTypedContext(SourceFile:275)
- locked <0x00000005d867da60> (a com.tibco.be.functions.xpath.BESchemaComponentCacheManager)
at com.tibco.be.functions.xpath.XSLT2Helper.doTransform(SourceFile:62)
...
A HTTP request will be triggered when the schema references an external location.
e.g.,
<import schemaLocation="http://schemas.xmlsoap.org/soap/encoding" namespace="http://schemas.xmlsoap.org/soap/encoding/"></import>
When the agent not able to load the schema from external resource and the HTTP request timed out the schema load can take several minutes.
A curl command executed on same server which hosts BE engines can help validate the response time for schema reference URL.
e.g.,
curl --url http://schemas.xmlsoap.org/soap/encoding/
To avoid the external request you can download the schema from external resource, add the XSD to the project and update the schema location in the import.
e.g.,
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"></import>
<import schemaLocation="schemas.xmlsoap.org.xsd" namespace="http://schemas.xmlsoap.org/soap/encoding/"></import>
Note:
When a proxy configured it is required to add the proxy details as JVM properties. To do this update the tra file and add parameters "-Dhttp.proxyHost=<proxyHost> -Dhttp.proxyPort=<proxyPort>" to TRA property "java.extended.properties".
e.g.,
java.extended.properties=-server -Dhttp.proxyHost=<PROXY_HOST> -Dhttp.proxyPort=8080 -Xms1024m -Xmx1024m -Xss2m -javaagent:/home/tibco/tibco/6.2/lib/cep-base.jar -XX:MaxMetaspaceSize=256m
Curl command
curl -v -x <PROXY_HOST> --url <URL>