Tinadm
Tinadm

Reputation: 369

Setting Glassfish database from inside application

I have a JSF application that uses a simple database for login management. I'm using Oracle Galssfish as server, and after I've done all the necessary configurations on admin console (setting up the driver, connection pools, etc), it's working properly.

However, I was wondering if there is a way to set the connection pool parameters (ip, port, username and password) from inside my application. I can crate all the properties I need on my bean and get/set then just fine, but how do I set them on Glassfish?

Upvotes: 1

Views: 74

Answers (1)

Andre
Andre

Reputation: 691

You could use AMX (Application Server Management Extenstions):

See https://blogs.oracle.com/JagadishPrasath/entry/creating_jdbc_connection_pool_resource#4_Creating_Connection_Pool__Resource

Upvotes: 1

Related Questions