Regarding servlets instance and client
Hi
Suppose 5 client programs are calling one servlets at a time.
Then how many instance will create 1 or 5?
if 1 then how 5 requests will be be processed
Please read "SRV.2.2 Number of Instances" in the Servlet specification.
Similar Messages
-
How can we differentiate between Servlet instances and threads.
Actuaaly i want to know how a servlet handles multiple client requests at the same time.
what i know is like:::
a client sends a request to the server.
A new thread is generated which will call the instance of the serlvlet on the server for processing..
Is this flow is correct???
am bit confused between threads and instances.
Please help!!!!If you make that your servlets implement the
SingleThreadModel interface (definition below), then
you can configure Tomcat with the size of the pool. I
think that even you can have only one instance, but
this is not very advisable, unless you want your users
to wait...Thnx for reply, Do you know how I can tell Tomcat to start multiple instances or alway stick with single instance. I cannot find this.
"public interface SingleThreadModel
Ensures that servlets handle only one request at a
time. This interface has no methods. Yes I am aware of this.
If a servlet implements this interface, you are
guaranteed that no two threads will execute
concurrently in the servlet's service method. The
servlet container can make this guarantee by
synchronizing access to a single instance of the
servlet, or by maintaining a pool of servlet instances
and dispatching each new request to a free servlet.
This interface does not prevent synchronization
problems that result from servlets accessing shared
resources such as static class variables or classes
outside the scope of the servlet."If only one user can access the servlet using this interface then why would you want syncrhonization??? There shouldn't be synchornization issues with a servlet that implements SingleThreadModel right?? -
SingleThreadModel and amount of servlet instances ??
Hi !
Is there anybody who knows how to determine amount of servlet instances in
wl5.1 if the servlet is implemented in SingleThreadModel ?
P.asi
Yup, I remember somebody mentioned that initial size is hardcoded to 5 and
max size to 20.
Robert Patrick <[email protected]> wrote:
> I am not sure if a recent Service Pack has changed this or not but the
> original implementation in WLS 5.x was that the SingleThreadModel always used
> a fixed number of servlet instances (5, I think...).
> Pasi Lukkarinen wrote:
>> Hi !
>>
>> Is there anybody who knows how to determine amount of servlet instances in
>> wl5.1 if the servlet is implemented in SingleThreadModel ?
>>
>> P.asi
Dimitri
-
Restricting Thread Pool for Servlet instances
I am using WebLogic5.1.0 version wherein I am registering a Servlet which
would be called by all the clients connecting
to my aplication. The servlet's service methods is taking some time to
execute. Since the servlet is following a SingleThreadModel, when there are
a large number of Clients connected, the number instances of Servlets
created are very high and the number of thread in the Application Server
process becomes very high affecting the performance of the other
applications.
Is it possible to restrict the number of instances of the servlets that get
created in the Application server ?
What are the setting required to achieve this ?
SandeepHi.
I'm not aware of a property setting that allows you to restrict the number of
servlet instances in WLS for the SingleThreadModel. The number of execute
threads is fixed - it does not grow depending on load. You can set this value
in the weblogic.properties file by setting weblogic.system.executeThreadCount.
This value is 15 by default.
It does sound like you are reaching the max capability of your
server/hardware. You should try tuning WLS.
Here are a couple of suggestions:
1. Try adjusting the executeThreadCount value to a higher value. Start by
setting it to 30 - see if that makes any difference.
2. Check out the following tuning guide:
http://www.weblogic.com/docs51/admindocs/tuning.html
3. Here is a list of admin properties that might aid in tuning:
http://www.weblogic.com/docs51/adminhelp/AdminPropertyHelp.html
4. If you are still having problems you might do better by posting this issue
to the performance newsgroup.
Regards,
Michael
Sandeep Rajpathak wrote:
I am using WebLogic5.1.0 version wherein I am registering a Servlet which
would be called by all the clients connecting
to my aplication. The servlet's service methods is taking some time to
execute. Since the servlet is following a SingleThreadModel, when there are
a large number of Clients connected, the number instances of Servlets
created are very high and the number of thread in the Application Server
process becomes very high affecting the performance of the other
applications.
Is it possible to restrict the number of instances of the servlets that get
created in the Application server ?
What are the setting required to achieve this ?
Sandeep--
Michael Young
Developer Relations Engineer
BEA Support -
Different behaviour on servlet w/o servlet-mapping and init parameters
I was playing around and found, that the init-parameter of a servlet is always null if there is no servlet mapping. I did not define a servlet mapping because I used the servlet only for for (named) dispatching (client usage should not be allowed).
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<servlet>
<servlet-name>InitParamServlet</servlet-name>
<servlet-class>test.InitParamServlet</servlet-class>
<init-param>
<param-name>param1</param-name>
<param-value>value1</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>InitParamServlet</servlet-name>
<url-pattern>*.initparam</url-pattern>
</servlet-mapping>
</web-app>
InitParamServlet.java:
package test;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class InitParamServlet extends HttpServlet{
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter pw = response.getWriter();
pw.write(getServletName());
pw.write(": param1=" + getInitParameter("param1"));
}The URL http://localhost:8080/xxx/servlet/test.InitParamServletreturns org.apache.catalina.INVOKER.test.InitParamServlet: param1=null
(on Tomcat), and the call to the same servlet with URL http://localhost:8080/xxx/test.initparamreturns InitParamServlet: param1=value1 instead (the correct init parameter value)!
The same happens with jetty. This looks strange for me; I would expect the same behaviour for the servlet (independent from servlet-mapping-tag in the web.xml).When you call the url
http://localhost:8080/xxx/servlet/test.InitParamServlet
you are actually calling the invoker servlet that is defined in the default conf/web.xml. If you look at this web.xml file you will see that the invoker is mapped with the pattern "/servlet/*" which maps to the above url. The request goes to this servlet which parses the url and then calls the InitParamServlet class.
When you call the url
http://localhost:8080/xxx/test.initparam
you are matching the url pattern you defined in the WEB-INF/web.xml file ("*.initparam"). This time the request goes to servlet instance that you defines in the servlet naming tags as "InitParamServlet" and since you defined init params they are populated.
Note that these urls will also match the "*.initparam" pattern
http://localhost:8080/xxx/XXXXX.initparam
http://localhost:8080/xxx/badpackage.initparam
http://localhost:8080/xxx/A.initparam
Most people would have simplely defined the second servlet mapping as "initparam" and accessed the servlet with the url
http://localhost:8080/xxx/initparam -
In a servlet code, I have only one Servlet class(namely NewServlet).
When this page is accessed by different clients, will only one instance be created or multiple instance be created ??Normally a servlet container will only create a single instance of a servlet. Unless you do something silly like declaring it to implement SingleThreadModel, that is. Why do you ask? Normally you should just make the servlet stateless and be done with it.
-
Where is a Servlet instance stored in Tomcat?
Hi,
We know that servlet container generates ONLY ONE servlet instance which will handle all the client requests for the servlet. This makes big inconvenionce in debug phase using Tomcat server. Unless restarting the server, you will not be able to see the changes you made in the servlet class.
My question is where the servlet instance is stored in Tomcat. I think it should be in [TOMCAT_HOME]/work/ directory but actually not. My approach is deleting the instance before sending request to the servlet. In this way, servlet container will generate an instance of new version of the servlet class.
Is there any other way to work around that?
Thanks,We know that servlet container generates ONLY ONE
servlet instance which will handle all the client
requests for the servlet. My Tomcat instance will pool servlet instances. It might look like only one instance to you, but that doesn't mean that Tomcat does it that way.
This makes big inconvenionce in debug phase using Tomcat server. This makes no sense to me. Are you talking about load testing?
Unless restarting the server, you will not be able to see the changes you made in the servlet class.This has nothing to do with debugging. And Tomcat has hot deployment now if you do it correctly with WAR files.
My question is where the servlet instance is stored in Tomcat. I think it should be in
[TOMCAT_HOME]/work/ directory but actually not. My approach is deleting the instance before sending
request to the servlet. In this way, servlet container will generate an instance of new version of the
servlet class.Sounds like you don't know how to deploy to Tomcat properly. Servlet .class files are stored where you put them: in the WEB-INF/classes directory for your Web app, in a JAR in the WEB-INF/lib directory for your Web app. These are either in the TOMCAT_HOME/webapps context directory that you create or, better yet, in the WAR file that you deploy to TOMCAT_HOME/webapps.
The /work directory that you refer to is where Tomcat puts generated Java code for JSPs.
Is there any other way to work around that?There's no way to change it, and there's no reason that I can think of to explain why you'd want to. What is the real problem here? -
I need to develop a web-based facility where I can present the contents of server-based CSV files to a thin-client user (i.e. browser only) in the form of graphs or charts. I want to stick to a Java solution, not ActiveX chart components.
I know that there are various Java-based components that I can purchase for a reasonably modest fee, but I would like to learn to do this myself.
Is JSF an appropriate technology for servlet graphing and charting ? Can anyone point me in a good direction for some code starters ?
Thanks.Hi,
please look at the sample-apps in SUN's RI for JSF.
There is a chart-component.
perhaps this is usful for you.
Regards,
Matthias -
Basic questions regarding installing Forefront EP Client 2010 on Windows 2012 R2
Hi,
We have a handful of servers and client machines (although these always seem to be expanding) and as such have previously just installed the Forefront Endpoint 2010 Client manually onto the various endpoints with updates being pushed via WSUS from a Windows
2008R2 machine, without running to a full installation of SCCM or the Forefront Endpoint Server. However, trying to install the FEP 2010 client directly onto new Windows 2012R2 servers result in a "This OS is not supported" error.
After checking some articles it appears that FEP 2010 might well be supported on Win 2012R2 (and Windows 8), but only if installed via SCCM. Is this correct?
We do have access to SCCM 2012, but again I have shied away from this. I had hoped that maybe the SCCM Endpoint client could also be installed manually once more, but trying to install this on a Windows 2012R2 machine results in a "Windows compatibility
mode is not supported by this program" error.
Am I barking up the wrong tree and will I now have to finally learn and install SCCM? If so I take it that I can update my 2008R2 WSUS server to firstly Win 2012RS WSUS, then add SCCM 2012?
Cheers
ChrisHi Joyce,
Thanks for the feedback.
Hi,
>>After checking some articles it appears that FEP 2010 might well be supported on Win 2012R2 (and Windows 8), but only if installed via SCCM. Is this correct?
According to the blog below, Forefront Endpoint Protection 2010 with Update Rollup 1
is supported on Windows Server 2012 R2.
http://blogs.technet.com/b/configmgrteam/archive/2013/09/16/support-questions-about-win-8.1-and-winsvr-2012-r2-for-configmgr-and-endpoint-protection.aspx
Please make sure you are running FEP 2010 update rollup 1. You could get it from the following link.
http://support2.microsoft.com/kb/2907566/en-us
Thanks for the feedback. I should have said that I have indeed tried this. From the initial link you posted I found the "Update Rollup 1 for Forefront Endpoint Protection 2010" (http://support2.microsoft.com/kb/2551095/en-us), however, this update
itself apparently requires a prerequisite. Whist I have tried to install the prerequisite (http://support2.microsoft.com/kb/2554364/en-us) and the Forefront Update Rollup 1 directly onto a a Windows 2012 R2 machine, I end up with errors:
Installing the Prerequisite result in a "Error code: 1642" in the log file. Have have tried to chase this error, but have not spent too much time digging as yet, but this appears to be more to do with the FEP server than the client.
Installing with the FEP Update Rollup (obviously without the prerequisite), give us three folders (FepExt, FepReport and FepUx), none of which seem to be the client per se
>>Ah, the later problem of trying to install a client from SCCM 2012 onto Windows 2012R2 maybe because I have been using SCCM 2012 SP1, and not SCCM 2012R2??
In SCCM 2012, Endpoint Protection 2012 is integrated so you cannot install FEP 2010 in it.
Best Regards,
Joyce
No no, What I meant was that I had hoped that I could install the client contained within SCCM 2012 R2 installation material manually onto a vanilla Windows 2012 R2 box (which is what I'm trying to do), in the same way that I could install the FEP 2010 on
previous Windows OS. The ISO that I have currently from our systems team is that of SCCM 2012 SP1, not SCCM 2012 R2, and the client within the SP1 package does not install in Windows 2012 R2. I'm tyring to get hold of the SCCM 2012 R2 ISO now, which (from
what I read) should allow me to manually install the client.
I may well play with SCCM later, but is a little over kill for our estate (read 10's of servers and clients, rather than 1000's), however, we should have a campus licence for SCCM.
Regards
Chris -
regarding mountain lion server: clients experience intermittent service connections. the server system log has the following error- Client handshake failed (6):113: Server not accepting client connections. any suggestions would be greatly appreciated - thank you
Hi Jason
I was getting the same behavior after Apple support had me delete some plist files to get Airplay going. I was also getting the following error:
the error occurred while processing a command of type 'writesettings' in the plug-in 'server vpn'
I went into ~/Library/Preferences/ and /Library/Preferences/ and deleted every plist contating the word server. I had to re-set up my server (meaning walk through some intial steps) but all of my settings were still there after that and everything started working again.
Just a thought, obviously try at your own risk but it worked for me.
Kellen -
How to find name of report if I know name of instance and location of instance in Output File Store
Hello all,
can somebody help me to find name of the report if I know name of report instance and also location of instance in Output File Store. It should be done via Query Builder.
It is ...rpt file as output from Crystal Reports. I tried few commands in Query Builder but usually they finished with timeout error.
Could you help me and send specific command? Or way how to change timeout of Query Builder?
Thanks.
matusHello all,
We finally found solution.
We knew that file is located on path .../Output/a_145/009/002/133521/~ce10c.....9332.rtf
This file has more than 2 GB. We tried to find which report is related and provide necessary actions.
As I mentioned we still failed due to timeout error - There was an error retrieving data from the server: CMS operation timed out after 9 minutes.
So we tried to use our testing environment. We started there QueryBuilder and there we successfully tested that we found details about files from FileStore /like Name of the report in Launch Pad, CUID, ...
SELECT SI_NAME, SI_CUID, SI_FILES FROM CI_INFOOBJECTS WHERE SI_FILES.SI_PATH = 'frs://Input/a_148/020/000/5268/'
or
SELECT * FROM CI_INFOOBJECTS WHERE SI_FILES.SI_PATH = 'frs://Input/ a_148/020/000/5268/'
Best regards,
matus -
Can i use same Server for server side and client??
Hi,
i m developing webservices in java and using two different server for server side and client.
e.g. i m using one tomcat server on a machine to run webservice and again using one more tomcat server on client side at different machine.
and hence it need two tomcat server.
But i want only one server to run webservice and client.
So please help me out...
ThanksHi,
It is always recommended to maintain different servers
REgards,
Ravi. -
No F4 value for system and client field for create job request
Hi,
While creating a job request in Solution manager system filed and client filed F4 is not working , it does not show any value.
Do you have any idea regarding this issue.
Thansk & Regards,
kaushalHello Kaushal,
you habe to link user, key user i.e. a business partner (BP), and managed system and this work like this:
a) User <-> BP: start transaction BP, assign role Employee to your business partner and enter the user name on tab Identification
b) BP <-> managed system: start transaction BP, select role General and enter the External System Identifier (format: <managed system ID> <installation number> <client> <user in managed system>) on tab Identification
Alternative: Use transaction BP_GEN to create valid business partners for managed systems
See also the Solution Manager Implementation Guide (IMG):
-> transaction SPRO
.> SAP Solution Manager Implementation Guide
-> SAP Solution Manager
-> Cross-Scenario Settings
then
-> Business Partners
and
-> iBase
(Note that IMG path (and labels) might vary in between support packages)
Kind regards,
Martin
http://service.sap.com/jsm -
Service Desk: System and client missing when creating a message.
Hi Experts,
I would like to find out if anyone has encountered this problem before. The system and client fields were blanked out and I am unable to select/create the system when creating a message. Thanks!Hello Wein,
If the system/client are grayed out in the workcenters, it is because when creating your BP you've probably created it only for a single system/client. Try to update your BP with another system (tx. BP_GEN).
Hope this will help.
Regards,
Stéphane.
Oups didn't see that the question was marked as answered...
Edited by: Stephane BUSTARRET on Aug 5, 2010 2:40 PM -
Hi
I checked many treads and still I couldn't get a satisfactory explanation to the difference between Business System and Client. I read in help.sap site that multiple business systems can be assigned to a single technical system and also each numbered client of an SAP system is a Unique Business System ? So are client and business system one ? If so why use it interchangably ? And if many business systems can be assigned to the technical system how do we specify a related Integration Server ? As I understand only one Business System can be assigned Integration server. So if we assign many business systems to one technical system then how can we have related Integration server for all ? I couldn't get a satisfactory explanation to this doubt in any thread in this forum
Midhun>>each numbered client of an SAP system is a Unique Business System ?
It could be. But it is not necessary that each client of SAP system is communicating with PI. If it is then there will be one Business System for each client.
>> So are client and business system one ?
No. Client is more substantial category in SAP system. Business system just defines the logical name to these clients if they communicate with PI.
>> If so why use it interchangably ?
Actually they can't be used interchangably always. The only relation is that for each client of SAP system, there could be only one Business system.
>>And if many business systems can be assigned to the technical system how do we specify a related Integration Server ?
For related Integration Server name, you need to select the PI Business system name which would communicate with your business system. For a single SLD scenario you will see PI Dev, Q and Prod business systems.
>> As I understand only one Business System can be assigned Integration server.
Correct. Its a PI Business system.
>> So if we assign many business systems to one technical system then how can we have related Integration server for all ?
For all Business systems of 1 technical system, you need to select the same PI Business system name.
Regards,
Prateek
Maybe you are looking for
-
HT2731 How do I set up an Apple ID for a child with gift card credit
How do I set up an Apple ID for a chld with a gift card credit, without credit card details and without using my own account?
-
Please give me detailed instructions if possible
-
ID and IDREF attributes in an XSD
Does anybody know if the ID and IDREF attributes within an XSD schema are implied when inserting an XML document or do I have to invoke an XML parser and do it via a DTD? When I test the XSD no validation is being performed on the ID and IDREF attrib
-
How to back up without losing anything?
BlackBerry Q5. I've had my phone turned off for a week and had switched my mobile network off. Yesterday I attempted to turn it all back on but my emails were not coming through. Then I discovered my WhatsApp was not working either. So I attempted to
-
I am trying to install solaris 10 and i get this error. WARNING: consconfig: cannot find driver for screen device /isa/motherboard@1,61 Can't find driver for console framebuffer I have an ati 9800 pro video card.