JBOSS EAP 6.4.4 Profiles

Latest response

Hi. We've been installing multiple applications which have different jdbc connection settings using this method;

First we create the new profile in the domain.xml file by copying / duplicating the ha-profile. Then we set the profile name to be unique for each app. Once we have the profile for the app in the domain.xml, we setup the jdbc, logging etc. using the GUI. This has worked well for us. Now we are upgrading from 6.0.1 to 6.4.4. This presents the opportunity to clean things up. The question has been raised about why not just use one profile for ALL applications. I am having a hard time understanding how that would work. For one profile with multiple jdbc connections configured, I believe that the apps could use the programmed jndi name for that app so that might work. For logging, the apps could use a common logging setup. But there are more settings than just jdbc and logging which may be unique to the app. I am looking for some feedback/best practices. I have had no luck finding this in the documentation.



HI Adrien

I think for something like this we'd perhaps need to see your current set up so I'd suggest raising a case. However, take a look at the following two articles which may provide you with some more information. https://access.redhat.com/solutions/402803 and https://access.redhat.com/solutions/185243 may also be useful.

Regards Mus

We have done some testing and it looks like this will work. We've added datasources for 2 application servers into the same HA-profile. Both apps worked fine. We had some questions about how to reset these jdbc connections without having to shutdown all application servers. We think that shouldn't be a problem.
With respect to the logging setup, we can use the variable (${jboss.server.name}) and it will set the filenames according to the servername which is what we need. So far it looks possible to share ONE profile for ALL our application servers.


We have noticed that having ALL jdbc datasources configured on ONE share profile is not really working like we'd like. You can start an app server that is not even using a datasource, yet all datasources are available to any app using the shared profile. If settings are set to have a minimum persistent connection (example: Min Pool Size: 1, Strick Minimum: true), then it will connect to that database even though the app server that uses it isn't started yet. (We started another server...it enabled the datasource because of the shared profile.) We now get too many sessions to the database errors for these persistent connections when we startup all our app servers. They all try to make connections to that database. What we need is a way to get a particular server group to only use a particular datasource in a shared profile. I don't believe we can do that. So that is my question. Do we have any variables to facilitate this. This is possibly a future enhancement that would be really nice to have.

Thanks, Adrien.

To summarize, I am looking for someone who understands JBOSS and how datasources work as to whether or not we can share one profile in the domain.xml for all app servers.

Thanks, Adrien.

We have come to the conclusion that you cannot share a common profile for multiple servers that each use their own JDBC datasources. There is interference with servers and the registration of the datasources. Example ERROR message: [Server:psso-0] 13:33:21,932 ERROR [org.jboss.msc.service] (MSC service thread 1-2) MSC000002: Invocation of listener "org.jboss.as.connector.subsystems.datasources.DataSourceStatisticsListener@5ce41c45" failed: java.lang.IllegalArgumentException: JBAS014809: A node is already registered at '(subsystem => datasources)(data-source => OPRA_USER_DS1)'

The server "psso-0" is trying to use a datasource meant for server "opra-0". We also found that to disable a datasource, you have to shutdown ALL servers. That is not a very practical.

In order for this to work, the listener (or whatever) piece of JBOSS would need to be put into the server-group configuration instead of the domain.xml configuration. If we could configure the JDBC datasources in the server-group, then we could share ONE common profile for ALL our servers regardless if they used a JDBC datasource or not.

So now we need a separate profile for each server that uses a JDBC datasource. We were trying to avoid the manual editing of the domain.xml to add these profiles.