This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Database Class in JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Database Class in JBoss" Watch "Database Class in JBoss" New topic
Author

Database Class in JBoss

Alex Kravets
Ranch Hand

Joined: Jan 24, 2001
Posts: 476
Hi guys,

I have a class that has static methods which select and update database. It basically used as like this: DBDriver.doSelect(databaseName,sqlQuery) and returns a vector with results. Now this works if I put class in app.war/WEB-INF/classes/ directory, but what if I want to use this class in other applications? Do I have to copy this class to every application's WEB-INF/classes directory or is there some place I can keep it globally? Should I jar it and put in my CLASSPATH?

thanks,
Alex


All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
Anthony McHenry.
Greenhorn

Joined: Mar 16, 2003
Posts: 9
Why don't you make your class a local session bean? That would solve your problem. And then you could make these db calls from anywhere on the planet.
 
Don't get me started about those stupid light bulbs.
 
subject: Database Class in JBoss
 
Similar Threads
Struts is not getting the action file. Throwing class not found exception - struts 1.3
Basic Question????
package not found
TLD XML elements in tomcat
Adding JSON package for Tomcat