[Remoting] - Limit number of simultaneous executing calls.
by danielen
We need to limit the peek throughput so that we dont DDOS all of our sub systems (db, external systems etc) that has a limit of how many clients calls they may execute at the same time.
We are migrating a weblogic application to jboss. Weblogic has execution queues that limit how many simultaneous rmi executions that could happen from all connected clients, and make sure that we always are safe within of the throughput limits of the system.
The only solution we have found right now,
pray that we never have any peaks in rmi trafic and that we can handle the normal application load within limits, is not good enough for production.
This is a EJB2 system with Stateless beans, using jboss 4.3 eap.
If no solutions in the ejb2 container, does the new ejb3 container support somthing we could use?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194021#4194021
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194021
17 years, 4 months
[Installation, Configuration & DEPLOYMENT] - Re: Separate Execute Queue in JBOSS
by danielen
Any news on this topic? JBoss still doesnt support any form og execution queue or any other method to limit the number of simultaneous rmi calls to a jboss server. We need to limit the peek throughput so that we dont DDOS all of our sub systems (db, external systems etc) that has a limit of how many clients calls they may execute at the same time.
The only solution we have found right now,
pray that we never have any peaks in rmi trafic and that we can handle the normal application load within limits, is not good enough for production.
We are migrating a weblogic application to jboss. Weblogic has execution queues that limit how many simultaneous rmi executions that could happen from all connected clients, and make sure that we always are safe within of the throughput limits of the system.
This is a EJB2 system, using jboss 4.3 eap.
If no solutions in the ejb2 container, does the new ejb3 container support somthing we could use?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194016#4194016
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194016
17 years, 4 months
[JBossWS] - Re: OutOfMemory exception when loading xml schemas in WSDL
by almarro1
Well, I think I've discovered the problem: there's a BUG in WSDL11Reader.java. When there are circular references in schemas, it creates an infginite loop.
Somehow I managed to solve it by adding a check just after a new schema include is processed. The followwing code shows what I've included in bold text:
| ...
|
| //Map of <locationURL,URL> to handle circular references in schema import
| private Map<String,URL> schemaImportMap = new HashMap<String, URL>();
| ...
|
| private URL processSchemaInclude(WSDLTypes types, URL wsdlLoc, Element schemaEl) throws IOException, WSDLException
| {
| System.out.println("processSchemaInclude: aÃÂÃÂÃÂÃÂÃÂÃÂÃÂñadiendo nuevo esquema: "+wsdlLoc.toString());
| if (wsdlLoc == null)
| throw new IllegalArgumentException("Cannot process iclude, parent location not set");
|
| File tmpFile = null;
| if (wsdlLoc == null)
| throw new IllegalArgumentException("Cannot process include, parent location not set");
|
| log.trace("processSchemaInclude: " + wsdlLoc);
|
| String schemaPrefix = schemaEl.getPrefix();
|
| String importTag = (schemaPrefix == null) ? "import" : schemaPrefix + ":import";
| Element importElement = schemaEl.getOwnerDocument().createElementNS(Constants.NS_SCHEMA_XSD, importTag);
| importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
| schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
|
| // Handle schema includes
| Iterator it = DOMUtils.getChildElements(schemaEl, new QName(Constants.NS_SCHEMA_XSD, "include"));
| while (it.hasNext())
| {
| Element includeEl = (Element)it.next();
| String location = getOptionalAttribute(includeEl, "schemaLocation");
| if (location == null)
| throw new IllegalArgumentException("schemaLocation is null for xsd:include");
|
| URL locationURL = getLocationURL(wsdlLoc, location);
|
| if(!schemaImportMap.containsKey(location)){
| schemaImportMap.put(location, locationURL);
| Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
| URL newloc = processSchemaInclude(types, locationURL, rootElement);
| if (newloc != null)
| includeEl.setAttribute("schemaLocation", newloc.toExternalForm());
|
| }else{
| includeEl.setAttribute("schemaLocation", schemaImportMap.get(location).toExternalForm());
| }
|
| }
|
| String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
| if (targetNS != null)
| {
| log.trace("processSchemaInclude: [targetNS=" + targetNS + ",parentURL=" + wsdlLoc + "]");
|
| tmpFile = SchemaUtils.getSchemaTempFile(targetNS);
| tempFiles.add(tmpFile);
|
| FileWriter fwrite = new FileWriter(tmpFile);
| new DOMWriter(fwrite).setPrettyprint(true).print(schemaEl);
| fwrite.close();
|
| schemaLocationsMap.put(targetNS, tmpFile.toURL());
| }
|
| // schema elements that have no target namespace are skipped
| //
| // <xsd:schema>
| // <xsd:import namespace="http://org.jboss.webservice/example/types" schemaLocation="Hello.xsd"/>
| // <xsd:import namespace="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservic..." schemaLocation="subdir/HelloArr.xsd"/>
| // </xsd:schema>
| if (targetNS == null)
| {
| log.trace("Schema element without target namespace in: " + wsdlLoc);
| }
|
| handleSchemaImports(schemaEl, wsdlLoc);
|
| return tmpFile != null ? tmpFile.toURL() : null;
| }
| ...
|
With this simple modification I've solved the OutOfMemory issue, but I haven't gone so far, so I don't know if the webservice will be working in the end.
As soon as I make tests I'll post the results.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194008#4194008
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194008
17 years, 4 months