[JBoss Messaging] - ConnectionFactory returns invalid URL which causes MessagingNetworkFailureException
by Duane Zamrok
Duane Zamrok [https://community.jboss.org/people/dewthefifth] created the discussion
"ConnectionFactory returns invalid URL which causes MessagingNetworkFailureException"
To view the discussion, visit: https://community.jboss.org/message/714389#714389
--------------------------------------------------------------
Hello, and thank you in advance for any assistence you might offer.
I am trying to connect two JBoss servers, executing on separate machines, to one another using JMS through JBoss Messaging. Due to network topography and proxying requirements, the each machine is referenced differently than the machine's hostname. I'll elaborate.
Network one contains a machine which we will call Jboss01.
Network two contains two machines, Jboss02 and Jboss03.
Network one and Network two communicate through a shared domain controller which we'll call DC01.
When Jboss01 attempts to access Jboss02 then DC01 directs Jboss01 to JbossProxy which will proxy traffic on port 443 to port 8443.
Jboss01 is incapable of reaching Jboss02 directly
When Jboss02 attempts to access Jboss03 then DC01 directs Jboss02 to JbossProxy which will proxy traffic on port 443 to port 8443.
Jboss02 is capable of reaching Jboss03 directly by asking specifically for Jboss03-vm which DC01 understands to be a direct link
Jboss01>hostname will return Jboss01
Jboss02>hostname will return Jboss02
Jboss03>hostname will return Jboss03
I am trying to send JMS messages from Jboss02 to Jboss03, but the org.jboss.jms.server.connectionfactory.ConnectionFactory returned from JNDI attempts to connect to Jboss03 instead of Jboss03-vm. This causes the connection to be routed through the proxy, which does not service the JMS port, and results in the MessageNetworkingFailureException mentioned in the topic. My JNDI connection is through Jboss03-vm, and I have set several properties (bind.addres, java.rmi.server.hostname) to Jboss03-vm to facilitate the direct connection that I require, but I cannot figure out how to configure the org.jboss.remoting.transport.Connector to use Jboss03-vm instead of Jboss03.
Thanks again for any help you might offer.
*Environment*
I am currently working within a customer controlled environment, which limits some of my options for upgrades and solutions.
*JbossAS*
jboss-eap-4.3
*JbossMessaging*
jboss.messaging.jmsVersion=1.1
jboss.messaging.jmsMajorVersion=1
jboss.messaging.jmsMinorVersion=1
jboss.messaging.jmsProviderName=JBoss Messaging
jboss.messaging.providerVersion=1.4.0.SP3-CP08.patch01
jboss.messaging.providerMajorVersion=1
jboss.messaging.providerMinorVersion=4
jboss.messaging.providerIncrementingVersion=32
*JbossRemoting*
Name: JBossRemoting
Specification-Title: JBossRemoting
Implementation-Title: JBossRemoting
Specification-Vendor: JBoss Inc.
Specification-Version: 2.2.3
Implementation-Vendor-Id: http://www.jboss.org http://www.jboss.org
Implementation-Version: 2.2.3
Implementation-Vendor: JBoss Inc.
*Properties*
bind.address=intellex-vm
jboss.bind.address=0.0.0.0
java.rmi.server.hostname=intellex-vm
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/714389#714389]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
14 years, 2 months
[Performance Tuning] - Problem while closing connection (wrappedConnection) retrieved from JBoss 5 pool.
by Ayush Gupta
Ayush Gupta [https://community.jboss.org/people/ayushgupta] created the document:
"Problem while closing connection (wrappedConnection) retrieved from JBoss 5 pool."
To view the document, visit: https://community.jboss.org/docs/DOC-17537
--------------------------------------------------------------
I have been using xa-datasource to have a connection pool for underlying oracle 10g database. I have created a pool of min size : 20 and max size : 40. I have a scenario where 20 threads are active, and each threads takes connection from the pool, completes its DB operation (i.e. saves approx 4000 records to DB). Once it completes the execution, it closes the connection which ideally should go back to the connection pool. The execution thread repeats it execution by taking a connection from pool and closes at the end on each execution cycle.
<xa-datasource>
<jndi-name>appstatetxds</jndi-name>
<use-java-context>false</use-java-context>
<track-connection-by-tx></track-connection-by-tx>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:oracle:thin:@smm_db_host:1521/ALSMM</xa-datasource-property>
<xa-datasource-property name="User">EPB_APP_CONF</xa-datasource-property>
<xa-datasource-property name="Password">abc123</xa-datasource-property>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<no-tx-separate-pools></no-tx-separate-pools>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
<!--pooling parameters-->
<min-pool-size>20</min-pool-size>
<max-pool-size>40</max-pool-size>
<blocking-timeout-millis>15000</blocking-timeout-millis>
<idle-timeout-minutes>50000</idle-timeout-minutes>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
</xa-datasource>
Now as connection is closed, it should go back to the pool immediately, but what I have been observing from the admin console, that max connection count goes upto 28. It is sure that no other process is running into the system apart from these 20 threads. Each thread retrieves the connection from pool and closes it.
I just want to know, what could be the reason for going a max count upto 28, which should ideally be 20.
Does close method invocation, just returns the handler, and in back-ground it actually takes time to synchronize the data with uderlying DB. I just want to restrict that the haldler should be returned only once the connection actually is returned back to pool.
This article was generated from the following discussion: https://community.jboss.org/thread/194819 Problem while closing connection (wrappedConnection) retrieved from JBoss 5 pool.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-17537]
Create a new document in Performance Tuning at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
14 years, 2 months
[Datasource Configuration] - What happens, once we call close on a connection retrieved from WrapperConnection
by Ayush Gupta
Ayush Gupta [https://community.jboss.org/people/ayushgupta] created the discussion
"What happens, once we call close on a connection retrieved from WrapperConnection"
To view the discussion, visit: https://community.jboss.org/message/714664#714664
--------------------------------------------------------------
I have been using xa-datasource to have a connection pool for underlying oracle 10g database. I have created a pool of min size : 20 and max size : 40. I have a scenario where 20 threads are active, and each threads takes connection from the pool, completes its DB operation (i.e. saves approx 4000 records to DB). Once it completes the execution, it closes the connection which ideally should go back to the connection pool. The execution thread repeats it execution by taking a connection from pool and closes at the end on each execution cycle.
<xa-datasource>
<jndi-name>appstatetxds</jndi-name>
<use-java-context>false</use-java-context>
<track-connection-by-tx></track-connection-by-tx>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:oracle:thin:@smm_db_host:1521/ALSMM</xa-datasource-property>
<xa-datasource-property name="User">EPB_APP_CONF</xa-datasource-property>
<xa-datasource-property name="Password">abc123</xa-datasource-property>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<no-tx-separate-pools></no-tx-separate-pools>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
<!--pooling parameters-->
<min-pool-size>20</min-pool-size>
<max-pool-size>40</max-pool-size>
<blocking-timeout-millis>15000</blocking-timeout-millis>
<idle-timeout-minutes>50000</idle-timeout-minutes>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
</xa-datasource>
Now as connection is closed, it should go back to the pool immediately, but what I have been observing from the admin console, that max connection count goes upto 28. It is sure that no other process is running into the system apart from these 20 threads. Each thread retrieves the connection from pool and closes it.
I just want to know, what could be the reason for going a max count upto 28, which should ideally be 20.
Does close method invocation, just returns the handler, and in back-ground it actually takes time to synchronize the data with uderlying DB. I just want to restrict that the haldler should be returned only once the connection actually is returned back to pool.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/714664#714664]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
14 years, 2 months
[jBPM] - problem in making a simple human task
by Amin Hosseiny Marani
Amin Hosseiny Marani [https://community.jboss.org/people/aminhosseiny] created the discussion
"problem in making a simple human task"
To view the discussion, visit: https://community.jboss.org/message/714653#714653
--------------------------------------------------------------
i try to do something that http://www.mastertheboss.com/jbpm/346-human-tasks-in-jbpm-5.html this url mentioned it...but unfortunatley these exception come to me!
my code
public class ProcessTest {
public static final void main(String[] args) {
try {
startUp();
KnowledgeBase kbase = readKnowledgeBase();
line 31: StatefulKnowledgeSession ksession = JBPMHelper.newStatefulKnowledgeSession(kbase);
ksession.startProcess("human_process");
System.out.println("Process started ...");
} catch (Throwable t) {
t.printStackTrace();
}
}
private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("sample2.bpmn"), ResourceType.BPMN2);
return kbuilder.newKnowledgeBase();
}
private static void startUp()
{
JBPMHelper.startH2Server();
JBPMHelper.setupDataSource();
}
the exceptions :
javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
at org.jbpm.test.JBPMHelper.loadStatefulKnowledgeSession(JBPMHelper.java:138)
at org.jbpm.test.JBPMHelper.newStatefulKnowledgeSession(JBPMHelper.java:127)
at com.sample.ProcessTest.main(ProcessTest.java:31)
Caused by: org.hibernate.HibernateException: Could not obtain BTM transaction manager instance
at org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:50)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:367)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.transaction.BTMTransactionManagerLookup.getTransactionManager(BTMTransactionManagerLookup.java:47)
... 9 more
Caused by: bitronix.tm.utils.InitializationException: cannot open disk journal
at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:75)
at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:62)
... 14 more
Caused by: java.io.IOException: transaction log file btm2.tlog is locked. Is another instance already running?
at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:72)
at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:152)
at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:62)
... 15 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/714653#714653]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
14 years, 2 months