Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Kavita Saluja

Greenhorn
+ Follow
since Jun 05, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kavita Saluja

Hi,

Thanks for the reply. Well if you made the classes static, that means the gethtml method must have been synchronized which I guess will effect performance.

As per your answer does it mean that if there are not any class level variables then that class classifies to be a singleton or static class ?

One more thing I am wondering about is whats the difference between a singleton and static class (logically and which one should be used where).

Regards
Thanks for the reply. I already have the implementation that you suggested (actually exactly the same).

My question here is should i change my implementation to make all those builders as singletons, since new objects are getting created (even though i maybe caching and pooling them) but still every object means more memory. So what I was thinking about is should I make these builders as singletons and make the gethtml method as synchronized for each builder. If I do so would it impact performance.

To put it another way - how to decide what class should be singleton (if the class doesnt have any class level variables or class is stateless).
I have one design question, which I am really confused about. The application that I am working on is really dynamic so the html is never coded in the jsp, its always build by the specific builders. For eg for different html types I have different html builders, for text i have a texthtmlbuilder class, for label i have a labelhtmlbuilder class, etc. All these builders generate the html based on one object 'Field' that is passed to them which has all the specifications. for eg this object called field will have getters etc for height, width, etc which the builders will be using to generate the html.

All the builders extend one base class which has implementation for methods that is common to all other builders. Every builder has a gethtml method which has its own specific implementation.

In the present implementation I am always creating a new object of the builder based on the type of the 'Field' object. No builder has any class level variables, everything is done based on this 'Field' object passed to the gethtml method of every builder.

The question is should these builders be singletons ? If yes, then all the gethtml methods I guess would need to be synchronized - wont this impact performance ?
Thanks for the answer !!
If that is the case, they what is the talk abt keeping sessions lightweight, i mean if the session is always only going to hold a reference for the object, then whether i store 2 refrences or 10 refrences, it should not be a big difference ? I have heard people compalining about performance because session is too heavy ...what does that actually mean then ?
Regards
16 years ago
I have one basic question regarding HttpSession. If I have an object A of the size of 1 MB, and I store the same object twice in session ,like session.setAttribute("one",A); and session.setAttribute("two",B); then what would be the size of session 1 MB or 2 MB.
16 years ago
Hi Tian,
Can you send me your mail id. I will like to discuss all the questions of Test 488. We can do that 10 questions a mail. If interested please reply back.
Thanks
kavita saluja
kavita_kavita_kavita@yahoo.com
18 years ago
Thanks Kyle
We are planning to move to WebSphere 4.0.1 in a month or so. I hope the server restart problem
will be resolved with that.
Thanks once again for your help
18 years ago
Thanks Kyle
Well the utility files I am referring to are the DAO's and the VO's and the specific Event clases. Since they are being used by the SessionBean (DAO's and VO's) then I guess we have to just restart the
server.
I am curious about the jar files question, why is it that if we just rename the same jar file then it gets deployed but otherwise it gives problems.
I will be very greatful if you can also answer one other question. For
using Admin Console remotely, we are doing it from NT to NT and Solaris to Solaris but it gives an error if we try to start the Admin Console from NT for Solaris. Is there any special thing that we have to do except for starting the AdminApplication.
Thanks and Regards
18 years ago
I am working on Websphere3.5 on Solaris 2.7. The problem is that in our developement environment we have to deploy the bean more than one time ( after new changes ), sometimes what happens is that during deployment time ( we take the deployed jar from VAJ3.5) it gives an error like invalid zip file or some other error, Now if we rename the same jar file and then deploy it then theres no problem. Is it that WAS3.5 holds on the reference to the bean even after removing it (though this problem occurs rarely, but my point is that is it a bug in WAS)
The second and very important question is that we always have to restart the server if theres a slight change in our class file. We have a directory structure outside the installation directory of WebSphere on Solaris. Websphere is installed on /opt/WebSphere/AppServer while the directories for the application are in /xyz/application name/ . The directory structure is such that all the core files are in one directory and all the utility files are in other directory. So if theres a slight change in the class file, we have to restart the server. Is that so in WebSphere3.5.4, i mean do we always have to restart the server, if thats so then i m very disappointed, coz its not viable to start the server again and again especially in our developement environments since there are so many frequent changes as its a very big project.
I hope I will get a solution.
Thanks and Regards
Kavita
18 years ago
The problem is that we have three application servers running under one node. Each App Server has a its own classpath set on the commandline and only one web application. We have just one servlet i.e the Front Controller catering to all the requests which is under the servlets directory (which also has the core components). Parallel to the servlet directory there is a classes directory in which we have all of our DAO's and VO's (i.e utility classes). Now everytime we make a change in any utility class we have to restart the server.
I wasnt able to find any information regarding this in the infocentre.
Can you please help?
Thanks in advance
18 years ago
We are working on Websphere3.5 on Solaris2.7. On developement environment during integration of modules everytime theres a change in the class file (for eg a DAO or VO) that my jsp is calling, we have to restart the server. Cant this be avoided on WAS3.5, so as if theres a change in the class file, I dont have to start the Server again. (As is the case with jsp's).
Thanks in advance
18 years ago
I have deployed a CMP which inserts a row into the database and also retrieves it. When i am accessing it through a jsp client, it updates the row and displays the newly inserted data, but when i move on to the oracle server, there is no insertion inside the table. After half an hour or so, the entry comes in the table of oracle database. I guess there is some problem in the ejbLoad() which the container uses to synchronize the bean fields with the database, though there is no method implementation of ejbLoad() in my CMP. Maybe the problem is that it is not performing the commit.
Any ideas or solutions?
18 years ago
Hi,
Well the problem was that i didnt had a user "ejb" on my oracle database. Thanks for the help.
I just wanted to ask something, if i dont use VAJ for deployment and just use jetace and deploybeans then is it possible that i can specify the table name i.e. map it to my CMP. There is this create table option after deploying a bean but it creats a table in the name of ejb.BeanNameTbl but i want to use my own table in the database.
Thanks and Regards
kavita_kavita_kavita@yahoo.com
19 years ago
I am using DataSource to connect to a database, the websphere app server is on Solaris. The problem is if the Oracle database is on the NT Server then it works fine but on the contrary if I use the database on the Solaris server then it gives and error:
Timeout waiting for free connection
the oracle server is already running on Solaris.
Can anyone help!!!
Thanks and Regards
kavita_kavita_kavita@yahoo.com
19 years ago
When I try to access a CMP through a servlet it gives me an error that table or view doesnot exist.
When I click on Create Table option in my cmp in container and restart it, it gives an
error t

Could not create bean table "EJB.SalesChannelBeanTbl" due to java.sql.SQLException: ORA-01918: user 'EJB' does not exist

I dont know where will i have to map my cmp with the table and also if i want the cmp
to create the table for me then what step i m missing.

I have created a datasource which is working fine independently so theres no problem in
data source.

Can anyone help

Thanks in anticipation


19 years ago