-
1. Re: Embedded datasources on AS 7 with Arquillian?
aslak May 19, 2011 10:43 AM (in response to atijms)Arquillian support @Deployment Descriptor which is any text based file. This is where datasource etc deployments will go, but this is currently not supported in AS7 either.
e.g:
@Deployment public static Descriptor createDataSource8) { return Descriptors.create(DataSourceDescriptor.class) .jndiName("") .provider(); }
-
2. Re: Embedded datasources on AS 7 with Arquillian?
atijms May 19, 2011 11:04 AM (in response to aslak)Thanks, that looks like it could possibly work if AS 7 support is there, although after looking around a little I was unable to find documentation about this DataSourceDescriptor class.
(still, it would be so much easier if AS 7 just kept supporting the embedded resources, but I'll ask for that in the AS 7 forum)
-
3. Re: Embedded datasources on AS 7 with Arquillian?
aslak May 19, 2011 11:32 AM (in response to atijms) -
4. Re: Embedded datasources on AS 7 with Arquillian?
john.genoese Sep 28, 2011 3:30 PM (in response to atijms)So is it fair to say that there exists at present no way to add a test-time datasource to JBoss AS7? In my case, I'm unpacking a JBoss 7 dist dynamically at test time, to emulate the self-contained test environment previously afforded me by use of embedded jboss (thanks for that, Aslak). I must somehow define my test datasource to this AS7 instance (the driver is H2, which is already there). Is there no Shrinkwrap/Arquillian functionality compatible with JBoss AS7 that accomplishes this?
-
5. Re: Embedded datasources on AS 7 with Arquillian?
aslak Sep 29, 2011 7:59 AM (in response to john.genoese)Currently no, but you can use Maven to prepare the environment before you start it, example:
https://github.com/arquillian/arquillian-showcase/blob/master/multinode/pom.xml#L116
-
6. Re: Embedded datasources on AS 7 with Arquillian?
kenfinni Sep 29, 2011 8:26 AM (in response to john.genoese)John,
I found out how to achieve this with a Managed AS7 Container the other day with ALRs help.
You need to create your own equivalent to standalone.xml that also contains the DS definition that you require for your Arquillian tests. I placed this file in src/test/resources so that it would be copied to target/test-classes.
Then in your arquillian.xml if you modify the AS7 Container configuration to include the following property:
<property name="serverConfig">target/test-classes/arq_standalone.xml</property>
This tells Arquillian to start the AS7 Managed Container with your standalone.xml configuration, which is equivalent to passing a serverConfig to the command line when starting AS7.
Hope that helps
Ken
-
7. Re: Embedded datasources on AS 7 with Arquillian?
john.genoese Sep 29, 2011 11:18 AM (in response to atijms)Both Aslak's and Ken's approaches were effective, and got me to my next step. Thanks very much for taking the time.
<comment type="whine" ignore="FEEL_FREE_TO">
I just wish they'd either put back the old -ds.xml approach. I can understand why a direct API for defining resources would cause some concern, particularly from a security standpoint, and I'm sure there are other issues as well (the whole domain thing, perhaps). But I sure do miss that just the same.
</comment>
-
8. Re: Embedded datasources on AS 7 with Arquillian?
cerker Nov 8, 2011 3:12 PM (in response to john.genoese)Wouldn't it be more elegant to use the jboss-as-maven-plugin?
http://relation.to/Bloggers/UsingTheJbossasMavenPluginToDeployDataSourcesToAS7
With the plugin it should be possible to deploy/undeploy the Resource Adapter as well as the data source / resource.
Did anybody try this? Anyway, I'll give it a try over the next days. And will report back here.
This approach is of course only viable if using Maven at all...
-
9. Re: Embedded datasources on AS 7 with Arquillian?
edevera Jun 11, 2013 11:45 AM (in response to aslak)Is there any plan to support JBoss AS 7 regarding the descriptors? If so, any estimate?
-
10. Re: Embedded datasources on AS 7 with Arquillian?
bmajsak Jun 13, 2013 5:04 AM (in response to edevera)Can't tell you about estimates and if this will be included, but you can try to use annotations for that purpose instead.