<br><br><div class="gmail_quote">On Mon, Jul 23, 2012 at 5:58 PM, Jason T. Greene <span dir="ltr">&lt;<a href="mailto:jason.greene@redhat.com" target="_blank">jason.greene@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 7/23/12 10:51 AM, Jesper Pedersen wrote:<br>
&gt; On 07/23/2012 11:42 AM, Flemming Harms wrote:<br>
&gt;&gt; I found a solution to my problem. Had to update the xsd schema with an<br>
&gt;&gt; extra attribute &quot;module&quot; and then user need pack his JDBC driver as module.<br>
&gt;&gt;<br>
&gt;&gt; I use the code below to load the model and the driver class.<br>
&gt;&gt;<br>
&gt;&gt; Class&lt;?&gt; driverClass =<br>
&gt;&gt; Module.loadClassFromCallerModuleLoader(ModuleIdentifier.fromString(moduleName),<br>
&gt;&gt; driver);<br>
&gt;&gt; driverClass.newInstance();<br>
&gt;&gt;<br>
&gt;&gt; &lt;outbound-connections&gt;<br>
&gt;&gt;           &lt;database&gt;<br>
&gt;&gt;               &lt;connection module=&quot;com.h2database.h2&quot;<br>
&gt;&gt; driver=&quot;org.h2.jdbcx.JdbcDataSource&quot; name=&quot;db&quot;<br>
&gt;&gt; url=&quot;jdbc:h2:/tmp/test;DB_CLOSE_DELAY=-1&quot; username=&quot;sa&quot; password=&quot;&quot;<br>
&gt;&gt; min-pool-size=&quot;10&quot; max-pool-size=&quot;20&quot; /&gt;<br>
&gt;&gt;           &lt;/database&gt;<br>
&gt;&gt; &lt;/outbound-connections&gt;<br>
&gt;&gt;<br>
&gt;&gt; Does it make sense?<br>
&gt;<br>
&gt; The -ds.xml functionality uses the module through the &lt;driver&gt; tag, so<br>
&gt; this would be similar.<br>
&gt;<br>
&gt; Things to watch out for is of course the password attribute - it should<br>
&gt; at least support the vault mechanism I would say.<br>
<br>
</div>If you make the attribute definition have expressions=true, it will<br>
automatically enable vault support.<br>
<div class="im HOEnZb"><br></div></blockquote><div>given that you use AD.parseAndSetParameter() when parsing and setting field and  AD.resolveModelAttribute() when getting data from model<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im HOEnZb">
--<br>
Jason T. Greene<br>
JBoss AS Lead / EAP Platform Architect<br>
JBoss, a division of Red Hat<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
jboss-as7-dev mailing list<br>
<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
</div></div></blockquote></div><br>