Deploying JDBC driver to WildFly

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploying JDBC driver to WildFly

Arun Gupta
I was talking to Adam Bien and he is an avid supporter of WildFly and
using it in all his projects now. One of his pet peeves is deployment
of JDBC driver.

He can either bundle it in WEB-INF/lib but prefer to deploy it on the
application server itself. Currently he deploys it as a JBoss module
but prefer it to be rather simplistic. His suggestion was to define a
directory like "standalone/lib/jdbc" and any JAR files copied there
should be automatically deployed as module.

What is the recommended way to deploy a JDBC driver to WildFly ?

Does it necessarily have to be deployed as JBoss module ? If yes, how
can this be simplified ?

Cheers
Arun

--
http://blog.arungupta.me
http://twitter.com/arungupta
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Brian Stansberry
You can deploy the driver as a jar, just like a war, ear etc. Then use
the deployment name in the driver element of the datasource config.

https://docs.jboss.org/author/display/WFLY9/DataSource+configuration

This old wiki article is pretty good too:

https://developer.jboss.org/wiki/DataSourceConfigurationInAS7

On 10/7/14, 2:50 PM, Arun Gupta wrote:

> I was talking to Adam Bien and he is an avid supporter of WildFly and
> using it in all his projects now. One of his pet peeves is deployment
> of JDBC driver.
>
> He can either bundle it in WEB-INF/lib but prefer to deploy it on the
> application server itself. Currently he deploys it as a JBoss module
> but prefer it to be rather simplistic. His suggestion was to define a
> directory like "standalone/lib/jdbc" and any JAR files copied there
> should be automatically deployed as module.
>
> What is the recommended way to deploy a JDBC driver to WildFly ?
>
> Does it necessarily have to be deployed as JBoss module ? If yes, how
> can this be simplified ?
>
> Cheers
> Arun
>


--
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Harald Pehl
In reply to this post by Arun Gupta
If it's a JDBC 4 compliant driver you can deploy it as regular jar and it will be detected automatically [1].

[1] https://docs.jboss.org/author/display/WFLY8/DataSource+configuration

Am 07.10.2014 um 21:50 schrieb Arun Gupta <[hidden email]>:

> I was talking to Adam Bien and he is an avid supporter of WildFly and
> using it in all his projects now. One of his pet peeves is deployment
> of JDBC driver.
>
> He can either bundle it in WEB-INF/lib but prefer to deploy it on the
> application server itself. Currently he deploys it as a JBoss module
> but prefer it to be rather simplistic. His suggestion was to define a
> directory like "standalone/lib/jdbc" and any JAR files copied there
> should be automatically deployed as module.
>
> What is the recommended way to deploy a JDBC driver to WildFly ?
>
> Does it necessarily have to be deployed as JBoss module ? If yes, how
> can this be simplified ?
>
> Cheers
> Arun
>
> --
> http://blog.arungupta.me
> http://twitter.com/arungupta
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev

---
Harald Pehl
JBoss by Red Hat
http://hpehl.info


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Arun Gupta
In reply to this post by Brian Stansberry
Cool, I think this is what he was looking for.

I've forwarded the information to him and hopefully this will make his
life somewhat simpler and create a stickiness with WildFly :)

On Tue, Oct 7, 2014 at 1:31 PM, Brian Stansberry
<[hidden email]> wrote:

> You can deploy the driver as a jar, just like a war, ear etc. Then use
> the deployment name in the driver element of the datasource config.
>
> https://docs.jboss.org/author/display/WFLY9/DataSource+configuration
>
> This old wiki article is pretty good too:
>
> https://developer.jboss.org/wiki/DataSourceConfigurationInAS7
>
> On 10/7/14, 2:50 PM, Arun Gupta wrote:
>> I was talking to Adam Bien and he is an avid supporter of WildFly and
>> using it in all his projects now. One of his pet peeves is deployment
>> of JDBC driver.
>>
>> He can either bundle it in WEB-INF/lib but prefer to deploy it on the
>> application server itself. Currently he deploys it as a JBoss module
>> but prefer it to be rather simplistic. His suggestion was to define a
>> directory like "standalone/lib/jdbc" and any JAR files copied there
>> should be automatically deployed as module.
>>
>> What is the recommended way to deploy a JDBC driver to WildFly ?
>>
>> Does it necessarily have to be deployed as JBoss module ? If yes, how
>> can this be simplified ?
>>
>> Cheers
>> Arun
>>
>
>
> --
> Brian Stansberry
> Senior Principal Software Engineer
> JBoss by Red Hat
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev



--
http://blog.arungupta.me
http://twitter.com/arungupta
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

arjan.tijms
Hi,

Just wondering, would it make sense for Arquillian to have (limited)
support for deploying/copying things like this JDBC driver, but also
things like JACC and JASPIC modules to the application server itself?

This is now particularly hard to test, but it's clearly an important use case.

Kind regards,
Arjan Tijms



On Tue, Oct 7, 2014 at 10:36 PM, Arun Gupta <[hidden email]> wrote:

> Cool, I think this is what he was looking for.
>
> I've forwarded the information to him and hopefully this will make his
> life somewhat simpler and create a stickiness with WildFly :)
>
> On Tue, Oct 7, 2014 at 1:31 PM, Brian Stansberry
> <[hidden email]> wrote:
>> You can deploy the driver as a jar, just like a war, ear etc. Then use
>> the deployment name in the driver element of the datasource config.
>>
>> https://docs.jboss.org/author/display/WFLY9/DataSource+configuration
>>
>> This old wiki article is pretty good too:
>>
>> https://developer.jboss.org/wiki/DataSourceConfigurationInAS7
>>
>> On 10/7/14, 2:50 PM, Arun Gupta wrote:
>>> I was talking to Adam Bien and he is an avid supporter of WildFly and
>>> using it in all his projects now. One of his pet peeves is deployment
>>> of JDBC driver.
>>>
>>> He can either bundle it in WEB-INF/lib but prefer to deploy it on the
>>> application server itself. Currently he deploys it as a JBoss module
>>> but prefer it to be rather simplistic. His suggestion was to define a
>>> directory like "standalone/lib/jdbc" and any JAR files copied there
>>> should be automatically deployed as module.
>>>
>>> What is the recommended way to deploy a JDBC driver to WildFly ?
>>>
>>> Does it necessarily have to be deployed as JBoss module ? If yes, how
>>> can this be simplified ?
>>>
>>> Cheers
>>> Arun
>>>
>>
>>
>> --
>> Brian Stansberry
>> Senior Principal Software Engineer
>> JBoss by Red Hat
>> _______________________________________________
>> wildfly-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
>
>
> --
> http://blog.arungupta.me
> http://twitter.com/arungupta
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Arun Gupta
In reply to this post by Brian Stansberry
Including Adam in the loop and here is what he had to say:

-- cut here --
I tried to install either DerbyDB or HSQLDB and they did not had the
META-INF/services/java.sql.Driver file. In such case you will have to
re-create the jar with the property file.

I would expect to just make the JARs available in the CLASSPATH as it
is the case in all other application servers,
-- cut here --

Suggestions ?

Arun

On Tue, Oct 7, 2014 at 1:31 PM, Brian Stansberry
<[hidden email]> wrote:

> You can deploy the driver as a jar, just like a war, ear etc. Then use
> the deployment name in the driver element of the datasource config.
>
> https://docs.jboss.org/author/display/WFLY9/DataSource+configuration
>
> This old wiki article is pretty good too:
>
> https://developer.jboss.org/wiki/DataSourceConfigurationInAS7
>
> On 10/7/14, 2:50 PM, Arun Gupta wrote:
>> I was talking to Adam Bien and he is an avid supporter of WildFly and
>> using it in all his projects now. One of his pet peeves is deployment
>> of JDBC driver.
>>
>> He can either bundle it in WEB-INF/lib but prefer to deploy it on the
>> application server itself. Currently he deploys it as a JBoss module
>> but prefer it to be rather simplistic. His suggestion was to define a
>> directory like "standalone/lib/jdbc" and any JAR files copied there
>> should be automatically deployed as module.
>>
>> What is the recommended way to deploy a JDBC driver to WildFly ?
>>
>> Does it necessarily have to be deployed as JBoss module ? If yes, how
>> can this be simplified ?
>>
>> Cheers
>> Arun
>>
>
>
> --
> Brian Stansberry
> Senior Principal Software Engineer
> JBoss by Red Hat
> _______________________________________________
> wildfly-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/wildfly-dev



--
http://blog.arungupta.me
http://twitter.com/arungupta
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Stuart Douglas
I have often though that it would be good to have support in
jboss-modules for directory based resource root (i.e. include all jars
in a directory).

That way we could include a pre-configured module directory that the
user can just dump their drivers in, and we could also include a
pre-configured global module, to make it easy for a user to expose a
library to every deployed application.

Stuart

Arun Gupta wrote:

> Including Adam in the loop and here is what he had to say:
>
> -- cut here --
> I tried to install either DerbyDB or HSQLDB and they did not had the
> META-INF/services/java.sql.Driver file. In such case you will have to
> re-create the jar with the property file.
>
> I would expect to just make the JARs available in the CLASSPATH as it
> is the case in all other application servers,
> -- cut here --
>
> Suggestions ?
>
> Arun
>
> On Tue, Oct 7, 2014 at 1:31 PM, Brian Stansberry
> <[hidden email]>  wrote:
>> You can deploy the driver as a jar, just like a war, ear etc. Then use
>> the deployment name in the driver element of the datasource config.
>>
>> https://docs.jboss.org/author/display/WFLY9/DataSource+configuration
>>
>> This old wiki article is pretty good too:
>>
>> https://developer.jboss.org/wiki/DataSourceConfigurationInAS7
>>
>> On 10/7/14, 2:50 PM, Arun Gupta wrote:
>>> I was talking to Adam Bien and he is an avid supporter of WildFly and
>>> using it in all his projects now. One of his pet peeves is deployment
>>> of JDBC driver.
>>>
>>> He can either bundle it in WEB-INF/lib but prefer to deploy it on the
>>> application server itself. Currently he deploys it as a JBoss module
>>> but prefer it to be rather simplistic. His suggestion was to define a
>>> directory like "standalone/lib/jdbc" and any JAR files copied there
>>> should be automatically deployed as module.
>>>
>>> What is the recommended way to deploy a JDBC driver to WildFly ?
>>>
>>> Does it necessarily have to be deployed as JBoss module ? If yes, how
>>> can this be simplified ?
>>>
>>> Cheers
>>> Arun
>>>
>>
>> --
>> Brian Stansberry
>> Senior Principal Software Engineer
>> JBoss by Red Hat
>> _______________________________________________
>> wildfly-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
>
>
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Heiko Braun
+1

On 08 Oct 2014, at 03:46, Stuart Douglas <[hidden email]> wrote:

That way we could include a pre-configured module directory that the 
user can just dump their drivers in, and we could also include a 
pre-configured global module, to make it easy for a user to expose a 
library to every deployed application.


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Jesper Pedersen-2
In reply to this post by Arun Gupta
On 10/07/2014 03:50 PM, Arun Gupta wrote:
>
> What is the recommended way to deploy a JDBC driver to WildFly ?
>

Deploying as a module is the recommended way for a number of reasons,

* JDBC driver is split into multiple JARs that needs to be considered as
one unit
* JDBC driver needs to be linked with already deployed modules
* Multiple versions of the 'same' JDBC driver for a vendor (yes, you can
rename when using deployments/)
* Native code integration

So, while having the option to deploy a JDBC driver in a simple way is
good, it doesn't cover all the cases that are needed in enterprise
deployments.

Best regards,
  Jesper

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Arun Gupta
I think providing a tool or CLI or directory that covers majority of
the cases would be really useful.

Arun

On Wed, Oct 8, 2014 at 5:37 AM, Jesper Pedersen
<[hidden email]> wrote:

> On 10/07/2014 03:50 PM, Arun Gupta wrote:
>>
>>
>> What is the recommended way to deploy a JDBC driver to WildFly ?
>>
>
> Deploying as a module is the recommended way for a number of reasons,
>
> * JDBC driver is split into multiple JARs that needs to be considered as one
> unit
> * JDBC driver needs to be linked with already deployed modules
> * Multiple versions of the 'same' JDBC driver for a vendor (yes, you can
> rename when using deployments/)
> * Native code integration
>
> So, while having the option to deploy a JDBC driver in a simple way is good,
> it doesn't cover all the cases that are needed in enterprise deployments.
>
> Best regards,
>  Jesper
>



--
http://blog.arungupta.me
http://twitter.com/arungupta
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Deploying JDBC driver to WildFly

Scott Marlow
We should probably have a wizard or tool for adding persistence
providers also.  That is easier with WildFly 8.x but could be easier.  I
think that the EAP installer might have a wizard for adding JDBC
drivers, so that is always an option for users.


On 10/08/2014 03:00 PM, Arun Gupta wrote:

> I think providing a tool or CLI or directory that covers majority of
> the cases would be really useful.
>
> Arun
>
> On Wed, Oct 8, 2014 at 5:37 AM, Jesper Pedersen
> <[hidden email]> wrote:
>> On 10/07/2014 03:50 PM, Arun Gupta wrote:
>>>
>>>
>>> What is the recommended way to deploy a JDBC driver to WildFly ?
>>>
>>
>> Deploying as a module is the recommended way for a number of reasons,
>>
>> * JDBC driver is split into multiple JARs that needs to be considered as one
>> unit
>> * JDBC driver needs to be linked with already deployed modules
>> * Multiple versions of the 'same' JDBC driver for a vendor (yes, you can
>> rename when using deployments/)
>> * Native code integration
>>
>> So, while having the option to deploy a JDBC driver in a simple way is good,
>> it doesn't cover all the cases that are needed in enterprise deployments.
>>
>> Best regards,
>>   Jesper
>>
>
>
>

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev