Gaurav Gupta

Greenhorn
+ Follow
since Jan 15, 2004
Merit badge: grant badges
For More
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 Gaurav Gupta

Trying to know the concept here. How is hot deployment for a jsp(or any other artifacts) achieved in Tomcat? Want to know the internals of how tomcat does it(and not what it is or what flags to set to enable it).

Thanks,
Gaurav
12 years ago
Hi,

I have a situation where before creating an Entity via an Entity bean, I need to do some validation on the properties of this entity. This validation is done by querying a statis data table look up in the database.
If the validation is successful then I create the entity else throw a proper exception.

Now - shall I code an Entity EJB for looking up this table and then do a Select on it(by EQL) to find out the validation data, or can I somehow use a DAO for the look up table from within my parent Entity EJB?

Shud I make Entity bean on look up data which is anyways not be transaction managed? Whats the best approach?

Thanks,
Gaurav Gupta
Hi,
I want to build a custom component which displays a table with specific colomns ...like text in first two colomns, icons in next three colomns.
This table diplsay will obviously use some css to style my text and some img files to display images.
Now, I want to build my tag such that:
Apart from providing data for table content, user can also specify his own css files and his own images if he wants to. If he doesnt want then he can use the default css and images.
Pls note- this is to be coded as a component.
How can I set my attributes for css and images? what should be the directory structure of this component? How can user override the default resource file by specifying his own?
Thanks,
gaurav
20 years ago
JSP
Hi,
I overheard from some very established J2EE experts that Struts is not really the perfect MVC implementation. It was something to do with callbacks between M, V and C.
Can this group throw light on this subject?
Thanks,
Gaurav
20 years ago
Hi,
I have a class A and a class B.
Now - can I do an enforcement which says that only B (and no other class) should be able to create objects of class A?
thanks,
Gaurav
20 years ago
How do Java threads co-relate with the native threads?
Does the JVM itself take up a native thread? Then when an application running in the JVM spawns more java threads, how do they utilize the native threads?
thanks
Hi,
What is the concept of method space in Java? How does it apply in the context of multi-threading paradigm?
Any good reference source for it?
Thanks
20 years ago
I am looking to get more of practical understanding of the JDBC drivers
Of the 4 types of JDBC drivers, what are the criteria of using the different drivers and which drivers(namely) are normally used while making Java-based applications?
Generally I have seen performance and the ease of deployment being the two major issues in choosing the driver. Are there any other factors which are important in the decision. A discussion on the subject would be helpful.
Thanks
Hi,
Can you tell me the strategies for creating Instance pools in Java. What are the different public methods to be created in the Pooling/controlling class. Should this class be a Singleton?
Thanks
20 years ago
Thanks Wayne...what you essentially mean is: For convenience methods write a static class while for getting polymorphic behaviour or maintaining a state use Singleton.
But usually its not recommended to extend a Singleton in apprehension of accidental creation of two instances of a Singleton.
Also I could not appreciate the efficiency factor stated by Pierre. If the method is static then a call to it does not demand the instantiation of its class every time.
May be I am simplifying the question or adding a bit to it but can someone elaborate the pros and cons of using a Singleton over a static class???
Thanks,
Gaurav
20 years ago
Hi,
What happens in the following case and why? How would monitor locking of the object work?
There are two synchronized methods in a single object. Two thread try to talk it, one accessing method 1 and other accessing method 2. Can they access these methods simultaneously?
What would be the difference if I make one of these two methods as static?
thanks,
Gaurav