need to find tables
Information :
I have a java web project (jsp ,servlet , struts , session beans also) and hibernate for DB (Oracle ) persistence.
the DB has approximately 100 tables .
Question i want to ask :
I have a JSP page , the data you entered in the screen goes to the DB tables finally ....but as it process through many java classes in between , its becoming very difficult to which table these data are going finally.
I want a finest methodology to track where (in which table) these data are getting stored ?
So, in fact ..i am facing trouble to track down where (in which tables ) the data are going .
though i am doing it in eclipse and debugging but still its not so easy because of so many java classes it passes through.
and this may not be a good effort after all.
can anybody tell me some way around.
tell me some of the techniques if any , i wish to try
Message was edited by:
Unknown_Citizen
Message was edited by:
Unknown_Citizen
why don't you just write a var in the user sessionfrom the moment you know what table he's gonna use, you just assignate the var "table" in the user session and then you will be able to get it back whenever you wantthis way you don't have to send the table var between
thanks for the response.
i think you have misunderstood a little bit.
so , i am going to clarify it in a simpler way
look here the steps
user entered data into screen
the data goes through several java classes , actions etc
may be/may not be calling session beans
can pick up a hibernate xml file to get the data stored into a DB table.
so , here are long steps to track via debugging to get the name of the tables where data are getting stored !!
need some easier tricks
unfortunately i think i can't help you on this one.. sorry :\
@Op. You said that you are using Oracle. There's an oracle driver that logs all statements that are executed. You can use that driver. Execute your application and read the log.
I think that Hibernate also can be configured to log all sql that is executed (if you don't want to use the oracle debug driver)
Kaj
> I think that Hibernate also can be configured to log
> all sql that is executed
excellent !
I did not think that so long !
this is really a good idea.
I have heard hibernate can be configured to convert HQL >SQL .....but never did before .............i'll do some R&D on it ........if you have any links/resources how to do it , which config file to modify ....and provide me that , that will be an extra bonus for me.
so far so good.
Thank you for the help
http://www.javalobby.org/java/forums/t44119.html
I have found a tag called show SQL =false in the hibernate-config.xml file .
I have modified it ...hope that will work fine.
By The WAy , I am also , curious to know ..how oracle driver can help me in this regard if i choose your first solution.
I am using TOAD to connect oracle and to view tables.
ORACLE DB is is a remote server .
and i use oracle jar file to connect to the DB from my code.
do you think , i have the adequate set up / rightsto avail your first solution ?
> do you think , i have the adequate set up / rights
>to avail your first solution ?
Yes. Just change to that you are using ojdbc14_g.jar instead of ojdbc14.jar. The _g driver is debug built and is using java.util.logging to log information about the sql that is executed.
Kaj
> > do you think , i have the adequate set up / rights
> >to avail your first solution ?
>
> Yes. Just change to that you are using ojdbc14_g.jar
> instead of ojdbc14.jar. The _g driver is debug built
sorry , the information i gave you was not true .
I am using the DB connection pool of weblogic server . and the driver is Thin XA oracle driver .
It seems to me , i cant do it ....because i dont have _g driver in the driver list and i doubt whether weblogic support this kind of driver.
> and is using java.util.logging to log information
> about the sql that is executed.
>
> Kaj
another update is , converted HQL to SQL is so bad looking ...that i started to forget the SQL :-( ....it does not look like proper SQL .
Thank you for your help and time
> I am using the DB connection pool of weblogic server
> . and the driver is Thin XA oracle driver .
>
> It seems to me , i cant do it ....because i dont have
> _g driver in the driver list and i doubt whether
>weblogic support this kind of driver.
It's just a configuration issue. Weblogic will support that driver as long as it supports jdbc.
Kaj