[Performance Tuning] - Re: DS - No managed connections available within blocking ti
by 4l3xb
possibilities:
- connection pool leak, http://wiki.jboss.org/wiki/Wiki.jsp?page=CanJBossTellMeWhenIDontCloseACon..., fix your app
- another resource pool in the system is constraining the number of concurrent connections/threads.
- JBoss not providing the required number of connections in the pool, check bug database, if none match, raise a defect will jboss,
- db server not configured to allow more than 100 connections, speak to dba as suggested,
you've already taken thread dumps and found not all threads are waiting for new db cons. points towards a leak or some other thread pool constraint
get some stats from http://wiki.jboss.org/wiki/Wiki.jsp?page=CanJBossTellMeWhenIDontCloseACon...
the pause/hang is probably due to the server running out of threads to service the requests (server.xml, maxThreads, default 200 - that needs to be at least 500 if you expect 500 concurrent requests), once this happens there is an overflow number (aceptCount, default 10) of connections that jboss will allow your stress tool to connect to, which will just sit and wait to be serviced also.
as the connection wait timeout is 30 seconds, once the connection pool is exhausted requests will wait 30 seconds until they fail. When you have >100 concurrent clients it may take a long time for all those requests to timeout before the server will respond again (the 200 seconds sounds reasonable). I'd suggest reducing the timeout to something like 200 milliseconds if your db server is on a local gigabit LAN, any longer and it's likely there is a problem in which case you'd want it to fail sooner rather than later in tests. On a LAN you should be able to connect to your db server in a couple of milliseconds.
monitor the number of concurrent connection to Jboss and db server on a 30 second interval and note if/when the connections shoot up. take dumps immediately after, don't wait for the hang.
does the same issue occur for 400,300,200,50 users after 1,2,3 hours? If it's a leak it doesn't matter how many users necessarily, as it may just be a matter of time before the connections run out.
I'd hope some of the above would get you closer to a diagnosis.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052756#4052756
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052756
18Â years, 10Â months
[JBossWS] - Problem marshalling data from a List
by gryffin
I have a problem sending a list of item to a client.
I send an object, which contains a member that itself stores a list of device objects. These objects store a member that is either a tag or a network device. ( I don't get to define the WSDL or Schema. )
I confirm that my List object does store a collection of devices which each in turn have a tag.
| 13:58:54,126 DEBUG [AssociationValuesDAO] Device.deviceList:
| [com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@18a5d49,
| com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@f2a0ef,
| com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@123b9c1,
| com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@786e16,
| com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@838143,
| com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@19b7dfa,
| com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@16bb63e,
| com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@89e0c6,
| com.boeing.nmt.types.DeviceData$Device$AeroScoutTag@3fcfb]
|
I send this across the wire ( server and client are local ). I unpack it and everything works great Until I try to access the tags inside the device objects in the List.
They're NULL.
| [java] device list: [com.boeing.nmt.client.ws.DeviceData$Device@102a0a5, com.boeing.nmt.client.
| ws.DeviceData$Device@180b22e, com.boeing.nmt.client.ws.DeviceData$Device@31fb31, com.boeing.nmt.clie
| nt.ws.DeviceData$Device@162522b, com.boeing.nmt.client.ws.DeviceData$Device@89dd, com.boeing.nmt.cli
| ent.ws.DeviceData$Device@15b1773, com.boeing.nmt.client.ws.DeviceData$Device@160bf50, com.boeing.nmt
| .client.ws.DeviceData$Device@b05236, com.boeing.nmt.client.ws.DeviceData$Device@1e55794]
| [java] device list size: 9
| [java] dev[1]: com.boeing.nmt.client.ws.DeviceData$Device@102a0a5
| [java] Exception! java.lang.NullPointerException
|
I trigger the exception this way:
| List <DeviceData.Device> devList = aagr.getAssociationValues().getDeviceData().getDevice();
| System.out.println("device list: " + devList.toString() );
| System.out.println("device list size: " + devList.size() );
| // devList.toArray()[0] is a DeviceData.Device.Tag object, for whatever reason, it's NULL
| System.out.println("dev[1]: " + devList.toArray()[0].toString());
| System.out.println("dev[1]: " + ((DeviceData.Device)devList.toArray()[0]).toString());
|
I look back at the logs to see what JBoss is unmarshalling, and it looks fine.
2007-06-08 13:58:54,158 DEBUG [org.jboss.ws.core.soap.ObjectContent] xmlFragment: [source=
| <Results xmlns:ns2="http://www.boeing.com/NLS/ns/Types" xmlns:ns3="http://www.boeing.com/NLS/ns/soapTypes" Version="0.3.0">
| <ns3:AssociationReturnCode>
| <ns3:Success>true</ns3:Success>
| <ns3:Reason>Dumb luck</ns3:Reason>
| </ns3:AssociationReturnCode>
| <ns3:AssociationValues DeleteOtherDeviceAssociations="false" CreateDeviceAssociations="NONE">
| <ns3:DeviceData Version="0.3.0">
| <ns2:Device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:AeroScoutTag" MacId="000CCC654323">
| <ns2:BatteryStatus>Unknown
| </ns2:BatteryStatus>
| </ns2:Device>
| ...
| </ns3:DeviceData>
| <ns3:AssetData Version="0.3.0" OwnerAppId="foo" AssetId="fah">
| <ns2:AssetDisplayName>gah</ns2:AssetDisplayName>
| <ns2:AssetDescription>fah</ns2:AssetDescription>
| <ns2:AssetSuspended>true</ns2:AssetSuspended>
| </ns3:AssetData>
| </ns3:AssociationValues>
| </Results>
| ]
| 2007-06-08 13:58:54,158 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
| 2007-06-08 13:58:54,220 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@131a24c (Thread http-0.0.0.0-8080-2)
I'm using JBoss 4.0.5 w/ JBossWS 1.2.0. Does anyone have an idea what am I missing?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052753#4052753
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052753
18Â years, 10Â months
[JBoss Seam] - newbie basic question on components
by X490812
I am checking out seam and not understanding something very basic.
I have a simple state less session bean
@Stateless
| @Name("tst")
| public class TstBean implements Tst {
|
| @Logger private Log log;
|
| @In FacesMessages facesMessages;
|
|
| private String strTst;
|
| public void tst()
| {
| //implement your business logic here
| log.info("tst.tst() action called strTst = " + strTst);
| facesMessages.add("tst");
| }
|
| public String getStrTst() {
| return strTst;
| }
|
| public void setStrTst(String strTst) {
| this.strTst = strTst;
| }
|
| }
and a simple view
<ui:define name="body">
|
| <h:messages globalOnly="true" styleClass="message"/>
|
| <rich:panel>
| <f:facet name="header">tst</f:facet>
|
| <h:form id="tstForm">
| <s:decorate id="valueDecoration" template="layout/edit.xhtml">
| <ui:define name="label">strTst</ui:define>
| <h:inputText id="value" required="true" value="#{tst.strTst}" />
| </s:decorate>
| <h:commandButton id="tst" value="tst!"
| action="#{tst.tst}"/>
|
| </h:form>
|
| </rich:panel>
|
| </ui:define>
Whay am I getting this error when I click on the command button?:
/tst.xhtml @22,70 value="#{tst.strTst}": Bean: org.javassist.tmp.java.lang.Object_$$_javassist_88, property: strTst
from the exception
on: /tst.xhtml @22,70 value="#{tst.strTst}": Bean: org.javassist.tmp.java.lang.Object_$$_javassist_88, property: strTst
I am missing something basic; How is the form data bound to the component?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052750#4052750
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052750
18Â years, 10Â months
[JBoss Seam] - Re: s:fileUpload+trinidad = no Renderer for component family
by javabr
Guys,
I simply can not get it working... please HELLLLLLLP ME..
from my code:
| <h:form id="task" styleClass="edit" enctype="multipart/form-data">
| ...
| <s:decorate id="fileToUploadDecoration">
| <s:fileUpload id="fileToUpload" style="size:60" accept=""
| data="#{fileHome.filedata}" fileName="#{fileHome.filename}"
| readonly="#{readonly}" />
| </s:decorate>
|
components.xml
| <web:multipart-filter create-temp-files="true"
| max-request-size="1000000" url-pattern="*.seam" />
|
from log, lots and lots of: (when i submit the form)
| 18:03:42,093 ERROR [STDERR] 08/06/2007 18:03:42 org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer
| WARNING: Renderer 'javax.faces.Text' not found for component family 'org.jboss.seam.ui.FileUpload'
|
My Bean:
| package org.bit.etask.home;
|
| import static javax.faces.application.FacesMessage.SEVERITY_INFO;
|
| import java.io.IOException;
| import java.util.ArrayList;
| import java.util.List;
|
| import org.bit.etask.AbstractEntityHome;
| import org.bit.etask.Authenticator;
| import org.bit.etask.Constants;
| import org.bit.etask.FileHelper;
| import org.bit.etask.domain.Activity;
| import org.bit.etask.domain.File;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
|
| @Name("fileHome")
| public class FileHome extends AbstractEntityHome<File> {
|
| private byte[] filedata;
|
| private String filename;
|
| private String fileUploadFrom;
|
| @In(create = true)
| Authenticator authenticator;
|
| @In(create = true)
| TaskHome taskHome;
|
| private List<File> files = new ArrayList<File>(0);
|
| public TaskHome getTaskHome() {
| return taskHome;
| }
|
| public void setTaskHome(TaskHome taskHome) {
| this.taskHome = taskHome;
| }
|
| public void setFileId(Integer id) {
| setId(id);
| }
|
| public Integer getFileId() {
| return (Integer) getId();
| }
|
| @Override
| protected File createInstance() {
| File file = new File();
| return file;
| }
|
| public File getDefinedInstance() {
| return isIdDefined() ? getInstance() : null;
| }
|
| public String uploadThis() {
| //FILE NAME AND FILEDATA ARE NULL EVERYTIME
|
| if (getFilename() == null
| || getFilename().equals("")
| || getInstance().getDescription() == null
| || getInstance().getDescription().equals("")) {
| return Constants.ERROR;
| }
|
| File file = new File();
| file.setFilename(FileHelper.getJustFileName(getFilename()));
| file.setDescription(getInstance().getDescription());
| file.setFiledata(getFiledata());
| files.add(file);
| getInstance().setDescription(null);
| try {
| FileHelper.saveFile(file, taskHome, authenticator.getLoggedActor());
| } catch (IOException e) {
| getFacesMessages().addFromResourceBundleOrDefault(SEVERITY_INFO, getMessageKeyPrefix() + "_upload",
| "Error uploading file: #0", e.getMessage());
| return Constants.ERROR;
| }
| return Constants.SUCCESS;
| }
|
| public String uploadIsDone() {
| if (FileHelper.isFromTaskEdit()) {
| taskHome.getInstance().getCurrentActivity().getFiles().clear();
| taskHome.getInstance().getCurrentActivity().getFiles().addAll(files);
| return "backToTaskEdit";
| } else {
| return "backToActorEdit";
| }
| }
|
| public String getFileUrl() {
| Activity activity = taskHome.getInstance().getCurrentActivity();
| String server = "../etask_uploaded/";
| String url = FileHelper.getUrlPath(activity.getActor(), taskHome);
| return server + url;
| }
|
| public void deattach(File file) {
| getFiles().remove(file);
| FileHelper.removeFile(file, taskHome, authenticator.getLoggedActor());
| if (FileHelper.isFromTaskEdit()) {
| taskHome.getInstance().getCurrentActivity().getFiles().clear();
| taskHome.getInstance().getCurrentActivity().getFiles().addAll(getFiles());
| }
| }
|
| public byte[] getFiledata() {
| return filedata;
| }
|
| public void setFiledata(byte[] filedata) {
| this.filedata = filedata;
| }
|
| public String getFilename() {
| return filename;
| }
|
| public void setFilename(String filename) {
| this.filename = filename;
| }
|
|
|
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052749#4052749
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052749
18Â years, 10Â months
[JBossWS] - Problem with String Array in WSDL generated in 4.0.5GA
by tballerstein
I am new to JBoss and deploying web services. I am trying to convert are old web services from ATG Platform to JBOSS 4.0.5GA. I have eveything converted to work with JBoss. I have a couple of services deployed and work properly. However I have a couple of services that do not work because one of the datatypes in the object that is being passed is a string array. When the array is passed to the server the array is null. I looked at the wsdl generated and it seems that wsdl generated did not recognize the string array. Here is the part of the wsdl. Entries is my String Array.
element maxOccurs="unbounded" minOccurs="0" name="entries" nillable="true" type="string"
When I deployed the service I simply deployed the jar file I did not actually create the wsdl file using wstools. I let Jboss deploy and generate the wsdl file.
How can I fix this problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052747#4052747
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052747
18Â years, 10Â months