I know how I’d do this using JBoss: create a *-ds.xml file, and drop it into my deploy directory.
- Is there a declarative way to do the same with GlassFish (v3.1)?
- Am I thinking about this the wrong way? (See next question)
- Is there a more-Glassfishy way to get my Java EE application to talk to a database?
Other potentially-revelant info:
- I want to connect to a SQL Server 2008 database
- I’m using Eclipse + GlassFish Server Tools
- I know next to nothing about GlassFish. I’m much more familiar with JBoss
You can define it in
application.xmlorejb-jar.xmlof your EAR. You can even use annotations.Long answer short: DataSource Resource Definition in Java EE 6.