[JCA/JBoss] - Re: Dedicated connection without connection pooling
by chavali
Hi,
The exception we are getting is during the managed connection close to the backend EIS(legacy c++) system. Can you please help us in making the managed connection close to the backend system. Please help us in avoiding the problem.
We are using JBoss4.2.0-GA. Please help us.
We are getting the following exception after getting the response from the backend C++ server. We are not calling the connection.close() explicitly , but JBoss is trying to call the close connection and throwing the below exception.
BELOW IS THE COMPLETE STACKTRACE DURING OUR JCA use.
11:40:24,890 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: com.ericsson.jca.connector.impl.CSTAConnectionImpl@134d246
java.lang.Throwable: STACKTRACE
at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at com.ericsson.jca.connector.impl.CSTAConnectionFactoryImpl.getConnection(CSTAConnectionFactoryImpl.java:55)
at xlink.ConnectionCreation.getConnection(ConnectionCreation.java:39)
at xlink.MonitoringServicesServerMessageReceiverInOut.invokeBusinessLogic(MonitoringServicesServerMessageReceiverInOut.java:90)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
11:40:24,890 INFO [STDOUT] in CSTAConnectionImpl.close-This is Synchronized method
11:40:24,890 INFO [STDOUT] in CSTAManagedConnection.close-This is synchronized method
11:40:24,890 INFO [NoTxConnectionManager] Unregistered handle that was not registered! null for managedConnection: com.ericsson.jca.connector.impl.CSTAManagedConnection@1664f1a
11:40:24,890 INFO [STDOUT] The application server has placed the connection back to the connection pool
Regards,
Chavali
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130010#4130010
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130010
18 years, 2 months
[JCA/JBoss] - Re: issues with JCA minimum connections
by tvbinh
Hi Vicky,
Thank you very much for your help,
anonymous wrote : 1) How are you getting the Connection Handle from the ConnectionFactory ? Are you passing the CRI details to the Connection Handle through the application code?
|
No, I declare all the properties in -ds.xml file e.g. and JBoss will read those. I prefer this way to hard coding properties into the codes. Below is the content of my -ds.xml
sampleds.xml
<connection-factories>
| <no-tx-connection-factory>
| <jndi-name>SimplewireDS</jndi-name>
| <rar-name>65-mitto-ra-smpp.rar</rar-name>
| <connection-definition>
| com.smsc.mitto.ra.smpp.SMPPConnectionFactory
| </connection-definition>
| <config-property name="Name" type="java.lang.String">Mitto-1</config-property>
| <config-property name="Server" type="java.lang.String">192.168.2.115</config-property>
| <config-property name="Port" type="java.lang.Integer">9999</config-property>
| <config-property name="Username" type="java.lang.String">binh</config-property>
| <config-property name="Password" type="java.lang.String">binh</config-property>
| <min-pool-size>0</min-pool-size>
| <max-pool-size>4</max-pool-size>
| <idle-timeout-minutes>525600</idle-timeout-minutes> <!-- if idle for a year reconnect... -->
| <blocking-timeout-millis>100</blocking-timeout-millis>
| <prefill>true</prefill>
| </no-tx-connection-factory>
| </connection-factories>
The properties are loaded in my <managed-connection-factory> class
public Object createConnectionFactory(ConnectionManager connectionManager)
| throws ResourceException {
| logger
| .info("Creating connection factory (with specified connectionmanager) in TelnetManagedConnectionfactory with id="
| + id);
|
| // At this stage the values from the configuration file should have been
| // set
| if (server != null && port != 0 && username != null && password != null
| && name != null) {
| SMPPRequestInfo smppInfo;
|
| smppInfo = new SMPPRequestInfo(username, password, server, port,
| name);
| return new SMPPConnectionFactoryImpl(connectionManager, this,
| smppInfo);
| } else
| throw new ResourceException();
| }
|
| public void setUsername(String username) {
| this.username = username;
| }
|
| public void setPassword(String password) {
| this.password = password;
| }
|
| public void setServer(String server) {
| this.server = server;
| }
|
| public void setPort(Integer port) {
| this.port = port;
| }
|
| public void setName(String name) {
| this.name = name;
| }
|
anonymous wrote : 2/ Verify if the <connectionfactory-impl-class> implementation are passsing the ConnectionRequestInfo appropriately when asked to .
| Look at the jdbc resource adapter implemetaion of the connectionfactory-impl-class here
|
| Since I declare all the properties in -ds.xml, I would probably not need to pass the ConnectionRequestInfo in my <connection-factory-impl> class. Here is the codes:
| public SMPPConnection getConnection() throws NamingException {
| logger
| .info("Request an SMPPConnection from the SMPPConnectionFactoryImpl with id="
| + id);
| SMPPConnectionImpl tc = null;
| try {
| tc = (SMPPConnectionImpl) manager.allocateConnection(factory,
| smppInfo);
| return tc;
| } catch (ResourceException ex) {
| // doing something
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130008#4130008
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130008
18 years, 2 months