It's possible to break the configurations of standalone.xml in multiple files and deploy this files with the .ear?
I wan't to separate the queue and naming configurations in others files. In old Jboss, i just put in some xml file in the deploy folder that jboss automatically deploy this configuration. Is this possible in jboss 7? Or is possible to attach standalone.xml in .ear package?
standalone.xml is the server configuration file, required to start the server and the server can and does rewrite the file. There is only one and it cannot be deployed as part of something else.
That said, from the release notes for 7.1 (https://community.jboss.org/wiki/AS710FinalReleaseNotes)
Deployable datasources and JMS destinations are back
Is this what you want? I've used deployable datasources, ie: deploy a file called mydb-ds.xml to create the database connection pool with a particular JNDI name. See this article, https://community.jboss.org/en/tools/blog/2012/02/28/excited-about-jboss-as-71-part-i-deployable-datasources
I didn't find a blog article for the JMS destinations but something like this (from the test cases) should work (I haven't used this yet).
<?xml version="1.0" encoding="UTF-8"?> <messaging-deployment xmlns="urn:jboss:messaging-deployment:1.0"> <hornetq-server> <jms-destinations> <jms-queue name="queue1"> <entry name="java:/queue1"/> <durable>true</durable> </jms-queue> <jms-topic name="topic1"> <entry name="java:/topic1"/> </jms-topic> </jms-destinations> </hornetq-server> </messaging-deployment>
The central configuration is one of the key features of AS7.
The deployable datasource files are not reccomended for production use!
If you want to have such extra file the recommended way is to use a script for the CLI command, with this you can simple add or remove any configuration to an existing instance without notice other (different) configurations.
BTW, the CLI or admin console are the recommended way to configure JBoss AS7.