7 Replies Latest reply on Apr 19, 2004 1:54 PM by Adrian Brock

    Strange behaviour in non-tx DataSource, when a transaction i

    Sampath Kondam Newbie

      Hi All,
      I saw this behaviour consistently one day last week, Unable to recreate again.

      I have a UserTransaction doing some DB work. In case If I get an error in committing, I
      get a connection from a non-tx DataSource to log a detailed message.

      On this particular instance the transaction is timing out due to heavy volume on the database.
      When I tied to commit after the work is finished, I am getting the following error(makes sense)

      javax.transaction.RollbackException: Already marked for rollback
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:331)
      at org.jboss.tm.TxManager.commit(TxManager.java:141)
      at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:126)


      When I tried to get a connection to log to the ERROR_LOG table using no-tx DataSource, I get
      the following error. I was consistently getting this error on that day, did not happen from then.


      javax.resource.ResourceException: Interrupted while requesting permit!
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:188)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool.getConnection(JBossManagedConnectionPool.java:643)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:413)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:488)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:798)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)


      I tried to recreate the above scenareo, first part can be recreated, but the second one, I am unable to reproduce.
      Did anyone saw this before?, If so, how to fix. Is this a weird behavior I saw that day due to some other problems in environment


      Thanks in advance,
      Sampath

        • 1. Re: The Unified classloader a little too unified?
          Adrian Brock Master

           

          "juha@jboss.org" wrote:
          However I didn't notice that supposed order of magnitude performance hit that supposedly comes with switching to remote interfaces in my webapps. I suppose it's possible that JBoss is doing some sort of magic and actually using the local interfaces under the cover for me.


          Nope, it's just detecting that you're invoking a component within a same process space and decides to pass a reference rather than make a copy of the values and serialize it. That is what the spec formalizes with local interfaces. We don't require them.

          It's just another non-standard feature (actually violates the spec too) for sloppy loving people like me. Once you configure that away you'll see your performance drop way down.

          You can configure this by setting ByValueInvokerInterceptor into your proxy interceptor stack. You're also going to need it once you have completely isolated your EJBs, as there's no way to share references across classloaders for duplicate class definitions (unless you start building "standard" Java classloader trees at which point you can say goodbye to hot-deploying individual packages of your application).

          HTH




          • 2. Re: Strange behaviour in non-tx DataSource, when a transacti
            Adrian Brock Master

            You might want to upgrade from 3.2.1 - you are now missing more than one
            years of fixes.

            http://cvs.sourceforge.net/viewcvs.py/jboss/jboss-transaction/src/main/org/jboss/tm/TransactionImpl.java?r1=1.5.2.14&r2=1.5.2.15

            In future, please check the latest release before reporting bugs that are already fixed.

            • 3. Re: Strange behaviour in non-tx DataSource, when a transacti
              Joe Barh Newbie

              Adrian,

              I can't stand anymore your comments in these forums. If 3.2.3 was not full of bugs, we would be able to upgrade. I've been reading you for months and I can say one thing for sure; you are rude.

              We've been using 3.2.0RC1 for months and there is no way we can move forward to another release since JBossCMP in 3.2.1, 3.2.2 and 3.2.3 returns invalid data after a random period of time. This is a showstopper.

              BTW, You are Director of Support, never forget what your role is...

              Joe

              • 4. Re: Strange behaviour in non-tx DataSource, when a transacti
                Adrian Brock Master

                So you report a bug that has already been fixed,
                but then claim you cannot upgrade because of a bug you haven't reported.

                I suppose that makes sense in some twisted sort of logic.

                Yes, I am rude. But only to time wasters. I consider that even more rude.

                • 5. Re: Strange behaviour in non-tx DataSource, when a transacti
                  Joe Barh Newbie

                  My point is that you can not ask people to upgrade to a release loaded with bugs. You could say "please get this patch from CVS and give a try". That would make more sense. Unfortunatelly, this is not how JBoss Group is managing releases, bug fixes and this is a real pain in the neck.

                  A true Director of Support CAN NOT say "Yes I am rude". Get another job Sir.

                  Joe

                  BTW: I am not the guy who started the thread. There is no "twisted logic" here.

                  • 6. Re: Strange behaviour in non-tx DataSource, when a transacti
                    Adrian Brock Master

                    You appear to be under some misapprehension about what these forums are for:

                    Yes, I am the Director of Support for JBoss Inc (not JBoss Group).
                    i.e. people who pay money for our time.
                    If he had JBoss Support, he would NOT have received my admonition about
                    time wasting, because he is paying for my time.
                    He would also have received a tested patch for his version of JBoss,
                    rather than just a pointer to the fix. We support all versions of JBoss.

                    On these forums I am acting as the open source lead for JBossJCA.
                    I do not get paid for posting here. I don't have to answer questions here.
                    I do it for free because I am looking for useful feedback and bug reports.

                    Your expectation of help should be zero (that is what you pay for).
                    You are more likely to get help if you have first made an effort to help yourself.
                    If you look like a time waster who just wants spoon feeding (somebody who makes
                    little or no effort to solve their own problems or do their own research)
                    you are in the wrong place.
                    That behaviour is not acceptable and I will shout at you.

                    Look here for further information:
                    http://jboss.org/wiki/Wiki.jsp?page=JBossForums

                    Regards,
                    Adrian

                    P.S. Thanks for pointing out you are the not the original poster. You also receive
                    negative Karma for hijacking somebody else's thread.

                    • 7. Re: Strange behaviour in non-tx DataSource, when a transacti
                      Joe Barh Newbie

                      Adrian,

                      Don't try to sidetrack this discussion would you. I've been doing my homework for years, spare me the bullshit about getting spoon fed.

                      Having said that, it seems to me that your response can be summed in 2 simple statements:
                      - if I pay for support I am your buddy
                      - if I don't, I am a piece of crap

                      Nice mentality.

                      If you don't want to answer a question or you're not interested in a subject, just walk away.

                      Anyway, your attitude doesn't make any sense whatsoever. I quote you "I do not get paid for posting here. I don't have to answer questions here. "....you are rude just for fun then???


                      Joe