aspose file tools*
The moose likes Tomcat and the fly likes getting my data in server.xml to pojo file..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "getting my data in server.xml to pojo file..?" Watch "getting my data in server.xml to pojo file..?" New topic
Author

getting my data in server.xml to pojo file..?

santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
Dear All

As we know through JNDI we can get the data base properties and we can connect to a perticular data base as defined in server.xml file but when we want my data other than data base like Table name of the data base because if tomorow i changed the table name with different but having same attributes in the prevoius table so that i can change in my server.xml . is it possible to get my own tag data into java code


Creativity is nothing but Breaking Rules
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

The JNDI connection pool doesn't specify table names, so that wouldn't help. Maybe you mean schema names.

You can update the connection pool configuration online via the Tomcat admin application or by using the JMX management console. However, if you switch databases, you have to stop and restart the webapp before the new pool can be used.

There's no reason why the webapp should know or care about the database name in most cases. I'd expect that if you really needed it (for a diagnostic webpage, for example), you could do a jdbc metadata request and that would return the current information direct from the database server itself. Which is more definitive anyway.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting my data in server.xml to pojo file..?