[jboss-dev-forums] [JBoss AS7 Development] - Data Source Configuration in AS 7
henk de boer
do-not-reply at jboss.com
Sat Jul 16 18:15:56 EDT 2011
henk de boer [http://community.jboss.org/people/henk53] commented on the document
"Data Source Configuration in AS 7"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-16657#comment-7056
--------------------------------------------------
> Terrence Curran wrote:
>
>
>
> why was the ability to deploy *-ds.xml datasources removed?
>
I had a similar question about deployment of those files when embedded inside a war or ear. I tried fairly hard to get an answer from the JBoss guys at: http://community.jboss.org/thread/164554 http://community.jboss.org/thread/164554
But 'the answers' are mostly just different variations on "it won't be supported", which is just stating a fact and not really answering the question about the why at all. The closest thing to an answer is a statement about an archive with an embedded datasource not being a Java EE archive anymore.
Personally I disagree with that, since the Java EE specification doesn't state at all that an archive stops being Java EE compliant as soon as its META-INF folder contains a datasource definition. The spec does indeed hints at it 'being the norm' that external resources (including JMS destinations) are defined externally, but IMHO this is open to interpretation and except for the simplistic @DataSourceDefinition the spec doesn't state how and exactly where these resources should be defined.
All of this doesn't explain at all why separate *-ds.xml files also can't be deployed anymore. To me the two cases do seem to be strongly related.
Maybe there's some sensitivity going on that the JBoss guys can't or don't want to discuss publicly.
> @DataSourceDefinition seems problamatic because it makes it very difficult for us to deploy the same war file to test, stage, and production.
Indeed, that's my beef with this (and the corresponding variant in XML as well). There are some options with parameterizing application.xml using the JBoss ${} syntax, but unlike *-ds.xml there doesn't seem to be an easy way to include different variations of application.xml.
One option that Jesper suggested is a totally new archive that contains a script, as well as any number of ears, wars, datasources etc. The script would then talk to the CLI of JBoss AS 7, which would then be able to do the deployment of all artifacts.
For those normally deploying with embedded datasources it would practically mean moving the definition one level up, while for those who normally deploy a separate war and -ds.xml it would mean doing a quick package before copying the files to the remote server.
--------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110716/24980f72/attachment.html
More information about the jboss-dev-forums
mailing list