Running Beans Locally that use Application Server Data Sources
Tuesday, May 11th, 2010When writing J2EE web applications, web services, enterprise Java beans (EJBs) or other pieces of code that run on a Java application server such as RedHat’s JBoss, IBM WebSphere or Apache Tomcat, a developer typically doesn’t load database drivers or connect to the database directly. Instead, a context lookup must be made in order to get a DataSource, and from there a Connection. However what if one needs to run existing code locally, outside of the web server? This guide shows developers how to setup a local context so application server code can be run in a stand-alone application without modification.
(more…)