This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 15629
    
  15

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..?
 
Similar Threads
Sql Loader Control file Urgent
Can someone please tell me how to store a table using file handling only
Urgent->where the table is stored by default of an cmp entity bean
Import from and export to Excel
Hibernate mapping:Bean class & MySQL DB View