Hi everybody,
I am trying to solve a design-issue but I can't find the proper solution for it. This is the problem:
We have an java application (client) that connects to a jboss-server and it does some database related tasks (show records in a JTable, add, edit and delete records). Everything fine so far.
The database connection is done by having a config-file for our database and let jboss do the pooling. This works fine as long as we use the method getConnection() of javax.sql.DataSource but in production we will have to use the method getConnection(String username, String password) instead. And here starts the party...
I am looking for a way to provide the server-side with the login data which the user has to enter during the startup of the client. But I only want to provide the data once! That means I don't want to hand over the username and the password in every jndi-call to a bean's method that accesses the database because this is a pain in the a**.
Isn't there any possibility to get a bean-instance that will hold this information persisten until the client disconnects from the server? Actually I am looking for something like a singleton-ejb-class (if you can call it like that). I tried it with a session bean and static variables which will not work in multiuser environment.
Any help is appreciated!
Cheers
frag
real_firestorm@gmx.de
I am trying to solve a design-issue but I can't find the proper solution for it. This is the problem:
We have an java application (client) that connects to a jboss-server and it does some database related tasks (show records in a JTable, add, edit and delete records). Everything fine so far.
The database connection is done by having a config-file for our database and let jboss do the pooling. This works fine as long as we use the method getConnection() of javax.sql.DataSource but in production we will have to use the method getConnection(String username, String password) instead. And here starts the party...
I am looking for a way to provide the server-side with the login data which the user has to enter during the startup of the client. But I only want to provide the data once! That means I don't want to hand over the username and the password in every jndi-call to a bean's method that accesses the database because this is a pain in the a**.
Isn't there any possibility to get a bean-instance that will hold this information persisten until the client disconnects from the server? Actually I am looking for something like a singleton-ejb-class (if you can call it like that). I tried it with a session bean and static variables which will not work in multiuser environment.
Any help is appreciated!
Cheers
frag
real_firestorm@gmx.de