Hi Güçlü,

There can be few possible reasons.

1. If you are using mounts on registry.xml, and if two mounts (or remote
instances) are pointing to the same DB, this can happen.

2. If you wrote your own transaction layer, may be you have not properly
extended the default implementation.

3. If you wrote your own transaction layer or if you made use of
transactions in some code, and did not properly aggregate commits, you can
still run into this situation. FYI, if you look @ the code, we don't commit
then and there in the case of a transaction, but accumulate statement
executions and commit at the end. By doing this, we achieve atomicity
across multiple DB operations, without having to write any app or db level
code. I suspect that this is the most likely cause.

Thanks,
Senaka.

2011/12/27 Güçlü Akkaya <[email protected]>

> **
>
>
> Hi all,
>
> This time i will disturb you with another problem related to a low level
> code. Currently i am trying to replicate the functionality of registry with
> JDBC Data access. For that i copied some of the interfaces and made another
> component named storage ,which will be used in the wso2 greg. Currently i
> am testing my implementation with tsung ,a load test tool supporting many
> protocols. By creating virtiual  users with tsung i inspect the performance
> of the storage component. In some cases i encounter the following exception
> for some requests.
>
> TID: [0] [WSO2 Governance Registry] [2011-12-27 10:55:34,983] ERROR
> {org.wso2.carbon.registry.core.dataaccess.TransactionManager} -  Failed to
> commit transaction.
> {org.wso2.carbon.registry.core.dataaccess.TransactionManager}
> java.sql.SQLException: Total number of available connections are less than
> the total number of committed connections
>         at
> org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCDatabaseTransaction$ManagedRegistryConnection.commit(JDBCDatabaseTransaction.java:1200)
>         at
> com.ardic.arcsp.carbon.registry.resource.core.jdbc.dataaccess.JDBCTransactionManager.commitTransaction(JDBCTransactionManager.java:170)
>         at
> com.ardic.arcsp.carbon.registry.resource.core.StorageRegistry.commitTransaction(StorageRegistry.java:352)
>         at
> com.ardic.arcsp.carbon.registry.resource.core.StorageRegistry.get(StorageRegistry.java:162)
>         at
> com.ardic.arcsp.carbon.registry.ws.api.WSRegistry.getContentById(WSRegistry.java:1037)
>         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.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
>         at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
>         at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>         at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
>         at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
>         at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
>         at
> org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:206)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>         at
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
>         at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
>         at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>         at
> org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:155)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>         at
> org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:241)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
>         at
> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
>         at
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356)
>         at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
>
>
>
> com.ardic.arcsp.carbon.registry.resource.core.jdbc.dataaccess.JDBCTransactionManager
> class is just the copy of the
> org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCTransactionManager. Since
> i did not want to original code with log i replicated the class and bind my
> dataacess layer. After i google i ecounter similar exception related to
> misconfiguration for sharing registry, but i am not sharing registry. So
> this a JDBC related matter. Can you tell me why this exception is thrown
> and recommend me some kind of workaround solution for this.
>
> Thanks in advance for the answers
>
> Fatih Güçlü Akkaya
>
> Software Development Engineer
>
>
>
>
>
>
> ARDIC ARGE BILGI VE TEKNOLOJI ÇÖZÜMLERI
>
> APPLIED RESEARCH DEVELOPMENT INNOVATION CENTER
>
> Tel:       + 90 262 642 42 52
>
> GSM:     + 90 554 542 48 50
>
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
*Senaka Fernando*
Product Manager - WSO2 Governance Registry;
Associate Technical Lead; WSO2 Inc.; http://wso2.com*
Member; Apache Software Foundation; http://apache.org

E-mail: senaka AT wso2.com
**P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
Linked-In: http://linkedin.com/in/senakafernando

*Lean . Enterprise . Middleware
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to