aspose file tools*
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 Java 8 in Action this week in the Java 8 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.
 
wood burning stoves
 
subject: Database Class in JBoss
 
Similar Threads
TLD XML elements in tomcat
Basic Question????
package not found
Struts is not getting the action file. Throwing class not found exception - struts 1.3
Adding JSON package for Tomcat