[JBoss AOP] - Re: ATOMIC aspect weaving ?
by flavia.rainone@jboss.com
JBoss AOP applies the optimal solution according to the specific case. This means that:
- at compile, it checks class by class, verifying all bindings and aspect that apply to that class, and weaving its code. In this case, weaving on a per aspect basis would be costly, because it would force JBoss AOP to weave a single class more than once.
- at load time, it also checks the classes as they become loaded in the jvm. This is also the best solution because, as in the previous case, doing it the other way would force JBoss AOP to process a class more than once. And trying to figure out all classes afected by a specific class would force the load of all classes, which is not what we want
- at runtime (hotswap), JBossAOP weaves at a per dynamic operation basis. This means that, if you add one or more Binding on a single dynamic aop operation, JBoss AOP will first define all join points affected, and, only after this, perform the weaving of the affected classes. Plus, on JBoss AOP there is no flag involved, so, you won't have the unsetting flag cost if you use JBoss AOP in this case.
- at runtime (without hotswap) in this case, the class code has already been weaved, so JBoss AOP just adds the advices to the appropriete advice stacks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994944#3994944
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994944
19 years, 4 months
[JBoss jBPM] - Signaling Process causes never ending Loop
by Becka
I have currently some Problems with one of my Actionhandlers.
I want to Signal a Process automaticly from within an other.
To now that worked without Problems.
But since i added a Second Transition to the Task, that should be Signaled the Server gets into a never Ending loop due to Leaving and Entering the same Task without any Stop.
This is the Result of a "normal" Signal, just with .signal();
I thought the Name of the Transition in the Signal might help, but the Result is the Same.
The Signaled Task is "waiting for change ...".
It has 2 leaving Transitions "(POSITIVE)" and "(NEGATIVE)"
Here is a Part of the Log:
| 11:56:56,467 INFO [STDOUT] transitionVariableValue = (NEGATIVE)
| 11:56:56,467 INFO [STDOUT] Signaling -> (NEGATIVE)
| 11:56:56,498 DEBUG [GraphElement] event 'before-signal' on 'State(waiting for change ...)' for 'Token(/)'
| 11:56:56,498 DEBUG [GraphElement] event 'node-leave' on 'State(waiting for change ...)' for 'Token(/)'
| 11:56:56,608 DEBUG [GraphElement] executing action 'action[calculate priority]'
| 11:56:56,608 DEBUG [GraphElement] executing action 'action[set status]'
| 11:56:56,608 INFO [STDOUT] Sending signal() in Node State(waiting for change ...)
| 11:56:56,608 DEBUG [GraphElement] event 'before-signal' on 'State(waiting for change ...)' for 'Token(/)'
| 11:56:56,623 DEBUG [GraphElement] event 'node-leave' on 'State(waiting for change ...)' for 'Token(/)'
| 11:56:56,639 DEBUG [GraphElement] executing action 'action[calculate priority]'
| 11:56:56,655 DEBUG [GraphElement] executing action 'action[set status]'
| 11:56:56,655 INFO [STDOUT] Sending signal() in Node State(waiting for change ...)
|
And some code:
System.out.println("Signaling -> " + transitionName);
| ciProcessInstance.signal(transitionName);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994942#3994942
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994942
19 years, 4 months
[JBoss Seam] - Cannot retrive data from session query to jsp (component not
by rrusinkiewicz
I have the following code in my jsp :
<h:form id="list">
<h:outputText value="No records to display" rendered="#{list.rowCount==0}"/>
<h:dataTable var="rec" value="#{list}" rendered="#{list.rowCount>0}">
<h:column>
<f:facet name="header">
<h:outputText value="Production order id"/>
</f:facet>
<h:outputText value="#{rec.T$PDNO}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Operation id"/>
</f:facet>
<h:outputText value="#{rec.T$OPNO}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Planned"/>
</f:facet>
<h:outputText value="#{rec.T$QPLN}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Completed"/>
</f:facet>
<h:outputText value="#{rec.T$QPRD}"/>
</h:column>
</h:dataTable>
</h:form>
In my session bean I have the following code:
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.datamodel.DataModel;
@Name("reportoperationsseambean")
@Stateful(name="reportoperationsSeam")
public class ReportOperationsSeamBean implements ReportOperationsSeam,ReportOperationsSeamLocal {
@PersistenceContext
(
unitName="reportoperationsSeam",
type=PersistenceContextType.EXTENDED
)
protected EntityManager em;
@In
private Ttisfc010 ttisfc010;
@DataModel
private List<Ttisfc010> list;
@DataModel
private Ttisfc010 recordTtisfc010;
@DataModel
private Ttisfc001 recordTtisfc001;
@DataModel
private Ttihra100 recordTtihra100;
@DataModel private Tticst002 recordTticst002;
public ReportOperationsSeamBean() {
}
@Factory(value="list",scope=ScopeType.CONVERSATION)
public void getTtisfc010(int startRecord) {
String query="select * from Ttisfc010906";
Query q = em.createNativeQuery(query,Ttisfc010.class);
q.setFirstResult(startRecord);
q.setMaxResults(100);
list= q.getResultList();
}
And my components.xml looks as follows:
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core">
<core:init jndi-name="roc-web-seam/#{reportoperationsSeam}/local"/>
>From the jboss log file I can see that component list is not found.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994940#3994940
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994940
19 years, 4 months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: Repeated column in mapping for entity
by smix007
Hello Stephen,
I' m hitting the same exact problem;
here my code:
TermProjPK.java
@Embeddable
| public class TermProjPK implements Serializable {
| private String auiw;
| @Column(name = "AUIS", nullable = false)
| private String auis;
|
TermProj.java
| public class TermProj implements Serializable {
| @EmbeddedId
| private TermProjPK termProjPK;
| //jointure avec la table TermSource
| @ManyToOne
| @JoinColumn (name = "AUIW")
| private TermSource auiw;
| public TermSource getAuiw() {
| return auiw;
| }
|
| public void setAuiw(TermSource auiw) {
| this.auiw = auiw;
| }
|
|
| //jointure avec la table SnomedInter
| @ManyToOne
| @JoinColumn (name = "AUIS")
| private SnomedInter auis;
| public SnomedInter getAuis() {
| return auis;
| }
|
| public void setAuis(SnomedInter auis) {
| this.auis = auis;
| }
| @Column(name = "MODIF")
| private String modif;
|
| @Column(name = "SRC", nullable = false)
| private String src;
TermSource.java
public class TermSource implements Serializable {
| @Id
| @Column(name = "AUIW", nullable = false)
| private String auiw;
| @OneToMany(mappedBy="auiw")
| private Collection<TermProj> termProjs;
|
| public Collection<TermProj> getTermProjs() {
| return termProjs;
| }
|
| public void setTermProjs(Collection<TermProj> termProjs) {
| this.termProjs = termProjs;
| }
SnomedInter.javapublic class SnomedInter implements Serializable {
| @Id
| @Column(name = "AUIS", nullable = false)
| private String auis;
| @OneToMany(mappedBy="auis")
| private Collection<TermProj> termProjs;
|
| public Collection<TermProj> getTermProjs() {
| return termProjs;
| }
|
| public void setTermProjs(Collection<TermProj> termProjs) {
| this.termProjs = termProjs;
| }
|
I always have the same error:
WARN [ServiceController] Problem starting service persistence.units:ear=Pharmacovigilance.ear,jar=Pharmacovigilance-ejb.jar,unitName=Pharmacovigilance-ejbPU
| org.hibernate.MappingException: Repeated column in mapping for entity: ejb.entity.TermProj column: AUIS (should be mapped with insert="false" update="false")
| at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:575)
|
my servlet of tests is as follows:
[...]TermProjFacadeLocal termProjFacadeLocal = (TermProjFacadeLocal) lookupTermProjFacade();
|
|
|
| List news = termProjFacadeLocal.findAll();
|
|
| out.println("<TABLE align=\"center\" frame=\"border\" cellpadding=\"2\">");
| out.println("<TR style=\"color:blue\"> <TH align=\"center\" > AUIW </TH> <TH align=\"center\"> AUIS </TH> <TH align=\"center\"> MODIF </TH><TH align=\"center\"> SRC </TH></TR>");
| for (Iterator it = news.iterator(); it.hasNext();) {
| TermProj elem = (TermProj) it.next();
| out.println(" <TR> <TD> <b>" + elem.getTermProjPK().getAuiw() + " </b> </TD>");
| out.println(" <TD> <b>" + elem.getTermProjPK().getAuis() + " </b> </TD> ");
| out.println(" <TD> <b>" + elem.getModif() + " </b> </TD> ");
| out.println(" <TD> <b>" + elem.getSrc() + " </b> </TD> </TR>");
| }
| out.println("</TABLE>");
| [...]
|
were there any suggestions made? Any help is greatly appreciated :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994933#3994933
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994933
19 years, 4 months
[Beginners Corner] - NoSuchMethodError when calling from a Schedulable
by realberen
Hello,
I've made a ScheduleService that implements Schedulable and to start with I want it to be my cron-substitute. The function I call is:
public String importCSV(int limit) {
importCSV i = new importCSV();
i.importFromDB(limit);
return "OK";
}
where importCSV is found through
import saers.util.*;
importCSV.importFromDB() is defined as:
public void importFromDB(int limit)
I've set up an mbean for SchedulerService and one based on org.jboss.varia.scheduler.Scheduler. When it is called I get the exception listed under in the logs. The main problem seems to be:
Caused by: java.lang.NoSuchMethodError: saers.util.importCSV.importFromDB(I)V
but as I mentioned, it is already defined:
public void importFromDB(int limit)
so that seems correct, it takes an integer and returns void. Why am I getting a NoSuchMethodError??
Here is the complete log:
2006-12-19 11:29:03,009 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] MBeanListener.handleNotification(), notification: javax.management.timer.TimerNotification[source=jboss:service=Timer][type=Schedule][message=Scheduler Notification]
2006-12-19 11:29:03,010 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] Scheduler is started: true
2006-12-19 11:29:03,010 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] MBean Arguments are: []
2006-12-19 11:29:03,010 DEBUG [org.jboss.varia.scheduler.Scheduler$Listener] MBean Arguments Types are: []
11:29:03,040 ERROR [Scheduler$Listener] Invoke of the Schedulable MBean failed
javax.management.RuntimeErrorException
at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:178)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.varia.scheduler.Scheduler$MBeanListener.handleNotification(Scheduler.java:1346)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
at $Proxy10.handleNotification(Unknown Source)
at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:221)
at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:184)
at javax.management.timer.Timer.sendNotification(Timer.java:1295)
at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1264)
at javax.management.timer.TimerAlarmClock.run(Timer.java:1347)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.NoSuchMethodError: saers.util.importCSV.importFromDB(I)V
at saers.scheduler.SchedulerService.importCSV(SchedulerService.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
... 17 more
2006-12-19 11:29:03,040 ERROR [org.jboss.varia.scheduler.Scheduler$Listener] Invoke of the Schedulable MBean failed
javax.management.RuntimeErrorException
at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:178)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.varia.scheduler.Scheduler$MBeanListener.handleNotification(Scheduler.java:1346)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
at $Proxy10.handleNotification(Unknown Source)
at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:221)
at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:184)
at javax.management.timer.Timer.sendNotification(Timer.java:1295)
at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1264)
at javax.management.timer.TimerAlarmClock.run(Timer.java:1347)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.NoSuchMethodError: saers.util.importCSV.importFromDB(I)V
at saers.scheduler.SchedulerService.importCSV(SchedulerService.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
... 17 more
Cheers
Nik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994932#3994932
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994932
19 years, 4 months