[EJB 3.0] New message: "Re: Application/EAR level interceptors"
by jaikiran pai
User development,
A new message was posted in the thread "Application/EAR level interceptors":
http://community.jboss.org/message/526760#526760
Author : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
> ThomasGo wrote:
>
>
>
>
> Conceptually, an application-wide interceptor could be used for other tasks that apply to all services of only one application.
>
>
You can actually place a jboss-aop.xml file in the .ear/META-INF folder. This jboss-aop.xml will then contain the pointcut expressions to intercept the calls to any bean implementation classes (or any classes for that matter) in that specific application. This is more related to JBoss AOP rather than EJB3. I am assuming you know about JBoss AOP and it's usage. Caveat - i haven't tried this and don't know if you might run into any issues.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/526760#526760
16 years, 5 months
[jBPM] New message: "Re: Exception handling in JBPM4 ?"
by Hernan Rodriguez
User development,
A new message was posted in the thread "Exception handling in JBPM4 ?":
http://community.jboss.org/message/526755#526755
Author : Hernan Rodriguez
Profile : http://community.jboss.org/people/HernanRodriguez
Message:
--------------------------------------------------------------
I have the same problem with Java Task nodes.
For example, I'm using the following model:
http://community.jboss.org/servlet/JiveServlet/downloadImage/2088/model.png
(java1, java2 and java 3 are Java Task. state1 is a State node)
When start the execution, this stop in "state1". Then, I resume the process instance. If "java3" throws an Exception the transaction is rolled back until "state1".
If "java1" and "java2" were successfully completed.. why are rolled back?
It's possible commit the transaction after each node?. This is possible with "Custom Nodes", but I need do the same with Java Task nodes.
The source of the model is:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <process key="test" name="test" xmlns="http://jbpm.org/4.2/jpdl">
>
> <start g="19,19,48,48" name="start1">
> <transition g="33,-7" name="to java1" to="state1"/>
> </start>
>
> <state g="60,71,92,52" name="state1">
> <transition g="13,-29" name="to java1" to="java1"/>
> </state>
>
> <java class="cl.pred.cmh.bpm.events.controller.TraspasoController" g="136,140,92,52" method="test" name="java1" var="respuesta1">
> <transition g="2,-17" name="to java2" to="java2"/>
> </java>
>
> <java class="cl.pred.cmh.bpm.events.controller.TraspasoController" g="281,281,92,52" method="test" name="java3" var="respuesta3">
> <transition g="3,-26" name="to end1" to="end1"/>
> </java>
>
> <java class="cl.pred.cmh.bpm.events.controller.TraspasoController" g="203,207,92,52" method="test" name="java2">
> <transition g="10,-21" name="to java3" to="java3"/>
> </java>
>
>
> <end g="372,332,48,48" name="end1"/>
>
>
> </process>
>
Any suggestion will be greatly appreciated.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/526755#526755
16 years, 5 months
[JBoss Microcontainer Development] New message: "Re: AnnotatedElementMetaDataLoader component metadata optimization"
by Kabir Khan
User development,
A new message was posted in the thread "AnnotatedElementMetaDataLoader component metadata optimization":
http://community.jboss.org/message/526747#526747
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
Ok, I'll go with the singleton. The problems I was seeing with returning the singleton was that its getValidTime() method returned null, adding a validTime field makes all tests in mdr and kernel pass. I'll add a simple test for that and commit what I have so far against https://jira.jboss.org/jira/browse/JBMDR-66
So far we avoid creating AnnotatedElementLoaders and ScopeKeys for the cases where a member does not have any annotations.
I think this could be taken a bit further, when a member has annotations, we currently create an AnnotatedElementLoader and thus a ScopeKey. As mentioned ScopeKeys are expensive to create due to creating their contained ConcurrentSkipListMap and this add call in the constructor which adds to the ConcurrentSkipListMap:
public ScopeKey(Scope scope)
{
addScope(scope);
}
Since it looks like there will only be one scope level in the key created by AnnotatedElementLoader, I am going to play with changing
private static final ScopeKey getScopeKey(AnnotatedElement annotated)
{
Scope scope;
if (annotated instanceof Class)
{
Class<?> clazz = Class.class.cast(annotated);
scope = new Scope(CommonLevels.CLASS, clazz);
}
else if (annotated instanceof Member)
{
Member member = (Member) annotated;
scope = new Scope(CommonLevels.JOINPOINT, member);
}
else
{
return ScopeKey.DEFAULT_SCOPE;
}
return new ScopeKey(scope);
}
to
private static final ScopeKey getScopeKey(AnnotatedElement annotated)
{
Scope scope;
if (annotated instanceof Class)
{
Class<?> clazz = Class.class.cast(annotated);
scope = new Scope(CommonLevels.CLASS, clazz);
return new ScopeKey(scope);
}
else if (annotated instanceof Member)
{
Member member = (Member) annotated;
scope = new Scope(CommonLevels.JOINPOINT, member);
return new SingleLevelScopeKey(scope);
}
else
{
return ScopeKey.DEFAULT_SCOPE;
}
}
where SingelLevelScopeKey will be a lightweight implementation of ScopeKey that does not have the internal ConcurrentSkipListMap. I might even be able to use the existing UnmodifiableScopeKey, so I will look into that first.
I think this could this also be used for the CLASS scope?
I need to check, but need to see if this could this also be used for the other metadata retrievals.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/526747#526747
16 years, 5 months
[JBoss Tools] New message: "JBoss AS WTP server adapter removes deployment module"
by Jan Beernink
User development,
A new message was posted in the thread "JBoss AS WTP server adapter removes deployment module":
http://community.jboss.org/message/526740#526740
Author : Jan Beernink
Profile : http://community.jboss.org/people/jan29
Message:
--------------------------------------------------------------
I've recently come across a bug in the JBoss AS WTP server adapter. Sometimes when editing and saving a file, this file is seen as a deployment module instead of the actual deployment module the file resides in. After some digging, I discovered that the problem was caused by the file org.jboss.ide.eclipse.as.core.prefs in the workspace metadata. This file was created around the same time as when the problem started and it contained the name of the file which was seen as the deployment module. Removing this file and redeploying the application solved the problem. I was using Eclipse 3.5 with JBoss 5.1.0 and JBossAS Tools version 2.1.0.v200912250601M-H198-CR1.
The contents of the file org.jboss.ide.eclipse.as.core.prefs were as follows.
#Fri Feb 12 11:10:13 CET 2010
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=/main_ejb/src/com/example/Example.java
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/526740#526740
16 years, 5 months