4 Replies Latest reply on Sep 27, 2002 6:00 AM by koo

    datasource logging

    koo Newbie

      Hello,

      I was using p6spy on jboss 3.0 with the following MBEAN


      com.p6spy.engine.spy.P6SpyDriver


      If I use the same mbean with jboss 3.0.2 it says :
      DefaultDomain:service=JdbcProvider is not registered.

      can somebody please help me ?
      thanks in advance.

        • 1. Re: datasource logging
          David Jencks Master

          If you said you were using it in 2.4.x it would be more plausible. JDBCProvider is gone from all jboss 3+ versions. Consult the numerous examples in docs/examples/jca for something to modify.

          You might want to consider using 3.2 beta since the datasource configuration is much simpler.

          • 2. Re: datasource logging
            koo Newbie

            David, Thanks a lot for your reply.. :)

            At the moment i'm authoring a document about transactional strategies inside J2EE, so i'm building little examples using Xdoclet and Middlegen (fantastic tools), I really enjoy working with JBoss and I need to log the sql queries that it sends to oracle

            I was working with jboss-3.0.0_tomcat-4.0.3 and everything was ok until the moment i tried to us EJBQL

            the findAll method of my entity bean (specified as EJBQL) returned LocalHome objects instead of Local Objects so I thought that it would be a good idea to upgrade to a newer version of jboss with better ejbql handling

            I still didn't try to use ejbql coz i'm still trying to have all the pieces of my previous environment working allright

            In my company I have to convince people that jboss is a great tool and for that P6SPY (www.p6spy.org) is great because I can show them the hard sql job jboss can do for them.

            I know that P6spy works allright and that it is just a matter of configuration under jboss

            P6spy has to become the jdbcProvider (according to jboss previous architecture) to intercept and log the queries from jboss, it was very easy to configure with my previous version but i cant manage to make it with the new jboss, could you give another hint please ?

            Thanks in advance.

            • 3. Re: datasource logging
              David Jencks Master

              Why not use jboss's built in logging? setting the priority for org.jboss.ejb.plugins.cmp to trace will certainly get you all the sql, then you can thin it out to just the sql. There are probably more explicit instructions in the docs and the cmp forum.

              If you want to use your tool, you'd just specify the datasource class in the *-ds.xml or *-service.xml. I have no idea how you'd configure the tool to find your actual database.

              • 4. Re: datasource logging
                koo Newbie

                Thanks a lot david for these clues I'll do my best to have it working and i'll get back to the forum with it.

                Coz you see we are running all the biggest application servers like bea wsad and jrun and i am in charge of giving courses about ejbs and i want everyone to learn on jboss so that they are aware that an open source server exists and is fully functionnal

                take care