[QA of JBoss Portal] - Re: SSO Unit Testing
by julien@jboss.com
there are 2 things about cargo:
- container life cycle control
- deployment
The portlet and web module use cargo to control an instance of a local container. (in addition of that the test framework has support for using cargo for deployment during the test, but it should not be used here)
In the future I want to migrate part of the sso integration in the web module and provide integrations with other platforms whenever it is possible.
Having the test case directly embed tomcat should not be done. Ant (or maven in the future) should control the life cycle of the container using the cargo start / stop.
Ant has also support for deploying into the container and also for shared classpath.
Here is an example used from the web module:
| <target name="cargo.tomcat-6.start" depends="cargo.setup">
| <cargo
| containerId="tomcat5x"
| home="${test.tomcat-6.home}"
| output="${cargo.log.dir}/cargo.${test.id}.server.log"
| log="${cargo.log.dir}/cargo.${test.id}.start.log"
| action="start"
| wait="${cargo.wait}">
| <sharedClasspath>
| <path location="${apache.log4j.lib}/log4j.jar"/>
| <path location="${oswego.concurrent.lib}/concurrent.jar"/>
| <path location="${jboss.portal/modules/common.lib}/portal-common-lib.jar"/>
| <path location="${sun.jaf.lib}/activation.jar"/>
| <path location="${junit.junit.lib}/junit.jar"/>
| <path location="${build.lib}/portal-web-lib.jar"/>
| </sharedClasspath>
| <configuration>
| <property name="cargo.servlet.port" value="8080"/>
| <property name="cargo.logging" value="high"/>
| <!--<property name="cargo.jvmargs" value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/>-->
| <deployable type="war" file="${codehaus.cargo.lib}/manager.war"/>
| <deployable type="war" file="${test.spi.server.path}"/>
| </configuration>
| </cargo>
| </target>
|
| <target name="cargo.tomcat-6.stop" depends="cargo.setup">
| <cargo
| containerId="tomcat5x"
| home="${test.tomcat-6.home}"
| log="${cargo.log.dir}/cargo.${test.id}.shutdown.log"
| action="stop">
| <configuration>
| </configuration>
| </cargo>
| </target>
|
Note the sharedClasspath attribute that is used to load classes visible by tomcat (equivalent to put jar in tomcat lib).
Note also the nested that will deploy the war files once the container has properly been started.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085650#4085650
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085650
18 years, 6 months
[Design of JBoss Profiler] - GC Operations screen
by forumer
I'd appreciate it if somebody can help me understand this screen: process view / memory:
I ran my ejb app for a few minutes and am using the profiler. I see six lines in the "GC Operations" view. One of my applications classes is present "underneath" each of these lines. Following are the counts for each respective line:
Quantity Release Quantity
10 7
29 0
37 0
37 0
37 0
37 0
First of all, is it true that each line represents a new GC cycle in chronological order?
Second, Does the number under "Quantity" represent cumulative number of objects created and the number it released under "Released Quantity"?
When I click on "Creations" on the last line, I get the method name, 37 and 30.
If this is true, does the above imply that 30 objects are leaking?
It'd help a great deal to understand this screen.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085610#4085610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085610
18 years, 6 months
[Design of JBoss Remoting, Unified Invokers] - Re: Interruption and the Remoting 3 API
by david.lloyd@jboss.com
"trustin" wrote : We could provide both interruptable and uninterruptable invocation methods; invoke and invokeUninterruptably (or invoke and invokeInterruptably) Then user could choose what they want.
Yeah, that's an option (d). I was hesitant to mention that due to the potential for massive API clutter, but that is an option as well.
"trustin" wrote : What confuses me though is if we are talking about the InterruptedException raised by Thread.interrupt() or any other interruption caused by means such as cancellation request for the invocation. Or are they treated as the same thing? Do we need to discriminate these two cases?
We're talking about Thread.interrupt() on the local side's blocking thread. If an operation is cancelled or interrupted on the remote side, it will get a RemotingException on the local side. The reason for this is that the proper behavior for an thread that catches InterruptedException is to either handle the interruption (if you are the owner of the thread), or propagate it. And I wouldn't want to falsely propagate thread interruption if I'm not in control of the thread's interruption policy. Does that make sense?
"trustin" wrote : I'd prefer to have a subclass of RemotingException (e.g. CancelledInvocationException) if we need discrimination. Users can deal with the interruption when they really want to do. This will also help users to find out if its interrupted by Thread.interrupt(), any system signal or request for cancellation from the type of the raised exception.
There is a well-defined protocol for how interruption must be handled (check out http://jcip.net/ for more info). For interruption, our two options are to throw InterruptedException, or propagate the thread's interruption flag.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085552#4085552
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085552
18 years, 6 months