Weblogic Portal Application Thread safety
Posted on 2006-05-30
How thread safe are the portal applications. I have a portal application. In one of the actions in the controller.jpf , I make a call to another method getConnection().
In the getConnection method, I take in the parameters username, password,etc and make a connection to another application server (in my case PeopleSoft application server).
Multiple users will be using my application simultaneously. To ensure that I pass in the right username, password to the getConnection() method for any instance, I have synchronized the method. Because of this, when 2 or more users use my application, it has slowed down significantly ( since the method is synchronized and only one instance can access that method at a time). I am afraid if that will cause any dead locks or may turn away the users.
What is the best method to make a weblogic portal application thread safe? Is it a good practice to synchronize a method?