Amol H Lekurwale

Greenhorn
+ Follow
since Aug 06, 2009
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 Amol H Lekurwale

David,
Thanks for your quick response.
One last query : For Webcontainers like Tomcat, JBoss etc. : If my servlet is *not* implementing SingleThreadModel interface, would that mean only a *single* instance of that servlet is created, always? In case by any means, if we are able to specify the pool size in such a case, then how many instances will be created? Single or as many defined in the configurations.

Regards,
Amol
12 years ago
David,
Does this mean that if more than one request is arriving at the same time or when the first one is being processed, the other has to wait? Or a new instance is created to serve each next request? Also, wouldn't this approach cause a performance issue?
12 years ago
Hi,

I read from a site that containers like tomcat create a pool of objects for servlet. This they state that is an example of multithreading.
Can anyone explain me what has a pool of objects to do with multithreading? If I dont declare any global variable inside a servlet, and as each thread gets its own copy of local variables, why cant a single object handle all request?
Now, as containers do it with servlet, what is done with struts action class object? Is it that a single action object takes care of all requests or a pool is created of objects for the action class? If a pool is created, where do we configure the pool size in a web-app?

Regards.
Amol
12 years ago
Thanks Peter for your quick response.
I just went through some of the tutorials on net, and my understanding is :
A service is actually an instance of the class mentioned in the config xml file. What we just need to do, when our code is deployed on JBoss is just to do a JNDI lookup, get the reference and call the required method from that object. Ofcourse, we need to configure the instance as you mentioned. Am I correct? I just need a brief idea of this thing.

Regards,
Amol
12 years ago
Hi,
I am new to use JNDI. I want to know, that how do we bound our object to a particular 'name', and what do we mean by that. Also, if binding to a name and then looking up using the name to obtain a reference to this object, does this mean that I can access to any object running on any JVM on the internet? Or it means that looking up and obtaining the reference is only meant for the same JVM on which JBoss/any server providing the JNDI service is running.

Regards,
Amol Lekurwale
Hi,
I am new to use JBoss. I want to know, since documentation says that Jboss has many services deployed on a server, how can I use any of the services, say the mail service, in a simple web application's servlet. Please let me know the details of various configurations needed to use the mail service, as well as a code snippet showing the actual use of the mail service.

Regards,
Amol Lekurwale
12 years ago
Hi,

I am developing a simple application, where in, there is no UI involved. My java code will be running as a background process. I want to make the program such that, if the user presses the key anywhere i.e. on any window running on the system, my program will be triggered and it will record the key pressed. In short, I want to listen to 'pure keyboard' without any focus concept getting involved. Is there any way to do so. System.in and other things require focus on UI window.

Regards.
Amol
12 years ago

seetharaman venkatasamy wrote:and welcome to javaranch Amol



Thanks seetharaman.
In that case, wont it be a security issue. I guess query string will be like www.xyz.com?a=b&c=d. So, lets say i login the user on one app, and redirect him to some other, passing the credentials as parameters, I cant make a POST request, instead i am making a simple get request. So isnt there any way that the communication between the two applications be made secure?
12 years ago
Hi,
I have two applications deployed on two different servers. My process is to let user request to the application on server A, authenticate him and then redirect him to Server B application. Can I send the session object created on Server A to Server B, containing the user data, using the encodeRedirectURL method?
12 years ago