-
1. Re: Deploy postgres driver with application [-> no copy to modules directory]
mayerw01 Feb 3, 2018 5:30 AM (in response to a.bader)In a stanalone environment you may install the driver jar as a regular deployment
-
2. Re: Deploy postgres driver with application [-> no copy to modules directory]
a.bader Feb 5, 2018 3:01 AM (in response to mayerw01)Thanks, Wolfgang, for your answer. Yes indeed, this is also possible. But this uses also a second action outside of own application. So I really wonder, why we cannot include the jdbc driver jar in the own application?! Or can we?
-
3. Re: Deploy postgres driver with application [-> no copy to modules directory]
zhurlik Feb 5, 2018 6:01 AM (in response to a.bader)I am not sure maybe it makes sense to look at JMX to be able to manage subsystems...
-
4. Re: Deploy postgres driver with application [-> no copy to modules directory]
mayerw01 Feb 5, 2018 7:29 AM (in response to zhurlik)Yes, of course you can include your jdbc driver in your war file. But since the datasource is defined in JBoss you will have to configure the driver in JBoss if you want to use the datasource (eg via JPA). But indeed there is no need to use the datasource. You may also use the JDBC driver driver directly (loading the driver via Class.forName() and DriverManager.getConnection()). This should also work.
-
5. Re: Deploy postgres driver with application [-> no copy to modules directory]
a.bader Feb 5, 2018 7:54 AM (in response to mayerw01)We can also define a datasource by including a xxx-ds.xml file. So we can decouple datasource config from JBoss. But it seems that with this datasource definition in a xxx-ds.xml file, only drivers from modules directory or already deployed drivers will be taken. So it would be nice, if we could point in the xxx-ds.xml to a jdbc driver in own .war. Can we?
-
6. Re: Deploy postgres driver with application [-> no copy to modules directory]
mayerw01 Feb 5, 2018 10:04 AM (in response to a.bader)I understand your problem is not to add the datasource definition but to configure the driver.
You will first have to add the driver via cli (/subsystem=datasources/jdbc-driver=postgresql:add(driver-name=...)
But you cannot add the driver as long as the driver is not deployed to JBoss.
-
7. Re: Deploy postgres driver with application [-> no copy to modules directory]
a.bader Feb 5, 2018 10:09 AM (in response to mayerw01)Thanks Wolfgang. I feared to get this answer...