Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database Class in JBoss

 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Anthony McHenry.
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic