[JBoss Messaging] - Re: LocalTx, ClientTransaction leak?
by ydzsidemiik
I am using the JMS RA. I look up the JMS connection factory using java:/JmsXA, my performance is reasonable, and I can see in the JMX console that the pool has connections in it and that they are being used. From the beginning I based this design on the assumption that the JMS connections would be pooled. Otherwise, as you note, it wouldn't work very well at all.
I propose that the JMS resource adapter could not be allocating or holding references to JBM internal objects. The trace only goes as far as to identify JcaXAResourceWrapper.end as being on the path to where the actual allocations occur, although it cuts off there for reasons unknown to me but probably having to do with my profiler.
I propose that the allocation could not actually occur in JcaXAResourceWrapper.end because that method contains no allocations of any kind. In my initial investigation of the JBM source, I guessed that the following frames which we do not see may be MessagingXAResource.end -> MessagingXAResource.unsetCurrentTransactionId -> ResourceManager.createLocalTx, a plausible control flow to a function where the objects observed to be leaking are actually being allocated. However, I cannot say with certainty that this is the case.
As per your suggestion, I will try not closing my JMS sessions explicitly.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118429#4118429
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118429
18 years, 3 months
PropertyNotFoundException
by Israel Fdez. Cabrera
Hi I'm new to JBoss and even to Java, so please, be patients ;) I was
reading the list archives and I found many similar questions but I could
not find one that helps.
I'm trying to develop a "helloWord" app to JBoss 4.2.2GA+Seam2.0.1CR1,
the code I wrote is this:
import javax.ejb.Local;
--------------The interface----------------------
@Local
public interface IHelloWorld {
public String sayHello();
}
---------------The action---------------------
import org.jboss.seam.annotations.Name;
@Name("helloWorld")
public class HelloWorldAction implements IHelloWorld {
public String sayHello() {
return "Hello World!";
}
}
------------The page------------------------
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<head>
<title>Hi!</title>
</head>
<body>
<f:view>
<h:outputText value="#{helloWorld.sayHello}"/>
</f:view>
</body>
</html>
Deployment goes fine but when I try to load the sample page JBoss prints
the following:
javax.el.PropertyNotFoundException: Target Unreachable, identifier
'helloWorld' resolved to null
at org.jboss.el.parser.AstValue.getTarget(AstValue.java:38)
at org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
at
org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:174)
at org.jboss.seam.navigation.Page.preRender(Page.java:264)
at org.jboss.seam.navigation.Pages.preRender(Pages.java:309)
at
org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:551)
at
org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:462)
at
org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
at
org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
I'm not too confident about my deployment process because (as I said
before) I'm new to this world so JBoss IDE for Eclipse is a dark piece
of software to me, and I did not found a way to deploy the project so I
wrote my own ant's build.xml which is this:
<project name="HelloWorld" default="deploy">
<description>
My First Seam Project
</description>
<property name="src" location="src" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="seam-libs"
location="/home/nebulha/Install/Java/JBoss/jboss-seam-2.0.1.CR1/lib" />
<property name="deployment-path"
location="/home/nebulha/Install/Java/JBoss/jboss-4.2.2.GA/server/default/deploy"
/>
<target name="compile" depends="init" description="Compile the source">
<javac srcdir="${src}" destdir="${build}">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${seam-libs}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="clean">
<delete dir="${dist}"/>
<delete dir="${build}"/>
</target>
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${dist}"/>
<mkdir dir="${build}"/>
<mkdir dir="${build}/view"/>
<mkdir dir="${build}/view/WEB-INF"/>
</target>
<target name="deploy"
depends="create_jar_dist,create_war_dist,create_ear_dist"
description="Deploy to a JBoss local server">
<copy todir="${deployment-path}"
file="${dist}/bananotree-helloworld.ear"/>
</target>
<target name="create_jar_dist" depends="compile"
description="generate the jar file to the distribution">
<jar jarfile="${dist}/bananotree-helloworld.jar"
basedir="${build}"/>
</target>
<target name="create_war_dist" depends="compile,prepare_war_dist"
description="generate the war file to the distribution">
<jar jarfile="${dist}/bananotree-helloworld.war"
basedir="${build}/view"/>
</target>
<target name="create_ear_dist" depends="compile,prepare_ear_dist"
description="generate the ear file to the distribution">
<jar jarfile="${dist}/bananotree-helloworld.ear"
basedir="${build}/ear"/>
</target>
<target name="prepare_ear_dist" depends="init">
<copy todir="${build}/ear" verbose="true">
<fileset dir="${dist}">
<include name="bananotree-helloworld.jar" />
<include name="bananotree-helloworld.war" />
</fileset>
<fileset dir="${seam-libs}">
<include name="*" />
<!-- <include name="jboss-seam.jar" />
<include name="jsf-facelets.jar"/>
<include name="jboss-el.jar"/>-->
</fileset>
</copy>
<copy todir="${build}/ear/META-INF" verbose="true">
<fileset dir="resources/META-INF">
<include name="*" />
</fileset>
</copy>
</target>
<target name="prepare_war_dist" depends="init">
<copy todir="${build}/view/WEB-INF" verbose="true">
<fileset dir="resources/WEB-INF">
<include name="*" />
</fileset>
</copy>
<copy todir="${build}/view/" verbose="true">
<fileset dir="${src}/view/">
<include name="helloWorld.xhtml"/>
</fileset>
</copy>
</target>
</project>
--
____________________
Israel Fdez. Cabrera
iferca(a)gmail.com
Linux registered user No.: 270292 [http://counter.li.org]
. 0 .
. . 0
0 0 0
18 years, 3 months
[JBoss Messaging] - Re: LocalTx, ClientTransaction leak?
by timfox
This doesn't look right to me.
The only time that creating a connection, creating a session, doing something, then closing them is not an antipattern, is when you are using a JMS JCA resource adaptor.
This is because when using a resource adaptor, when you call createConnection() it doesn't actually create an actual new JMS connection, it just retrieves one from a pool that the resource adaptor maintains.
If you're not using a JCA resource adaptor then each call to createConnection, createSession etc will actually create new JMS connections, sessions etc.
Connections and Sessions are heavyweight objects and designed to be re-used. If this is the case then performance is going to very, very bad. Hence it's an antipattern.
If you're seeing lots of actual sessions created it would imply you're not actually using the JCA resource adaptor.
Can you confirm that the connections you create are created using the JCA JMS managed connection factory?
(This is the connection factory you get by looking up typically from java:/JmsXA)
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossJMSRA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118424#4118424
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118424
18 years, 3 months
[JBossWS] - Is this a valid JAX-WS binding file for wsconsume?
by Brad Marshall
I want wsconsume to do custom package to namespace mappings using the --binding option. I have no experience writing JAX-WS binding files. I created the one listed below, and while wsconsume generates no errors, it also ignores the the pacjage-namespace attributes in the file. What have I got wrong?
(Note that these same parameters, restructured for Axis and with escaping the colons, work with the Axis Wsdl2Java tool as a NsToPkg.properties file.)
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
| <jaxws:bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| wsdlLocation="CA.wsdl"
| xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
| <jaxws:package-namespace package="ca.webservice.valueobj.cse" namespace="urn:lm:tscse"/>
| <jaxws:package-namespace package="ca.webservice.request" namespace="urn:lm:tsqikreq"/>
| <jaxws:package-namespace package="ca.webservice.response" namespace="urn:lm:tsqikrsp"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.ca" namespace="urn:anyco:tsca"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.ca" namespace="urn:anyco:tscsact"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.ci" namespace="urn:anyco:tsci"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.ci" namespace="urn:anyco:tscis"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.cp" namespace="urn:anyco:tscp"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.cp" namespace="urn:anyco:tscspt"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.fn" namespace="urn:anyco:tsfn"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.fn" namespace="urn:anyco:tsfin"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.id" namespace="urn:anyco:tsidy"/>
| <jaxws:package-namespace package="ca.webservice.valueobj.header" namespace="urn:anyco:tschdr"/>
| <jaxws:package-namespace package="ca.webservice.caws" namespace="http://www.anyco.com/wsdl/CA.wsdl"/>
| <jaxws:package-namespace package="ca.webservice.caws" namespace="http://www.anyco.com/wsdl/CA.xsd"/>
| </jaxws:bindings>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118423#4118423
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118423
18 years, 3 months