[JBoss jBPM] - compare ProcessDefinition's
by SidKennedy
Hello again,
how would you compare two ProcessDefinition? That's what I'm doing: I have a processdefinition.xml. It is parsed and a ProcessDefinition is created. This ProcessDefinition will be added to a list. Now it should not be possible to add the same ProcessDefinition to that list, but as I call JpdlXmlReader#readProcessDefinition() a "new" ProcessDefinition is created but of the same Process if it is called on the same processdefinition.xml. How would you compare those processes? equals() always returns false as you can imagine. So maybe a possibility is to compare the lists via ProcessDefinition#getNodes() but it is possible to add some additional data to a action-tag for example. So I want to here what do you think about that issue.
greets
Sid
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085100#4085100
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085100
18 years, 9 months
[JBoss Seam] - MDB as Seam Component yields an Exception on Shutdown
by gbc@gmx.de
Hi!
I'm using a simple Message Driven Bean (code doesn't matter) on a Queue as Seam (2.0Beta1) Component. While JBoss 4.2 is running, everything runs fine and works as expected.
But on shutdown, JBoss shows following exception but only if my MDB has been used while runtime. If not, no exception is being shown.
| 16:44:58,140 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
| 16:44:58,312 WARN [JmxKernelAbstraction] jboss.j2ee:ear=Seam.ear,jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3 is not registered
| 16:44:58,312 WARN [JmxKernelAbstraction] jboss.j2ee:ear=Seam.ear,jar=jboss-seam.jar,name=EjbSynchronizations,service=EJB3 is not registered
| 16:44:58,359 WARN [JmxKernelAbstraction] jboss.j2ee:ear=Seam.ear,jar=Seam.jar,name=DocumentAction,service=EJB3 is not registered
| 16:44:58,359 WARN [JmxKernelAbstraction] jboss.j2ee:ear=Seam.ear,jar=Seam.jar,name=PaperAction,service=EJB3 is not registered
| 16:44:58,390 WARN [JmxKernelAbstraction] jboss.j2ee:ear=Seam.ear,jar=Seam.jar,name=TemplateAction,service=EJB3 is not registered
| 16:44:58,406 WARN [JmxKernelAbstraction] jboss.j2ee:ear=Seam.ear,jar=Seam.jar,name=PaperMessage,service=EJB3 is not registered
| 16:44:58,406 WARN [JmxKernelAbstraction] jboss.j2ee:ear=Seam.ear,jar=Seam.jar,name=PatternMessage,service=EJB3 is not registered
| 16:44:58,406 WARN [JmxKernelAbstraction] jboss.j2ee:ear=Seam.ear,jar=Seam.jar,name=PenServerMessage,service=EJB3 is not registered
| 16:44:58,406 WARN [MdbDelegateWrapper] Stopping failed jboss.j2ee:ear=Seam.ear,jar=Seam.jar,name=TemplateMessage,service=EJB3
| java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the an initialized application
| at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.preDestroy(LifecycleInterceptorHandler.java:135)
| at org.jboss.ejb3.EJBContainer.invokePreDestroy(EJBContainer.java:621)
| at org.jboss.ejb3.AbstractPool.remove(AbstractPool.java:207)
| at org.jboss.ejb3.AbstractPool.discard(AbstractPool.java:218)
| at org.jboss.ejb3.StrictMaxPool.discard(StrictMaxPool.java:243)
| at org.jboss.ejb3.StrictMaxPool.freeAll(StrictMaxPool.java:269)
| at org.jboss.ejb3.StrictMaxPool.destroy(StrictMaxPool.java:226)
| at org.jboss.ejb3.EJBContainer.stop(EJBContainer.java:589)
| at org.jboss.ejb3.mdb.MessagingContainer.stop(MessagingContainer.java:292)
| 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.ejb3.ServiceDelegateWrapper.stopService(ServiceDelegateWrapper.java:119)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
| 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.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.stop(Unknown Source)
| at org.jboss.system.ServiceController.stop(ServiceController.java:508)
| 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)
| 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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy57.stop(Unknown Source)
| at org.jboss.ejb3.JmxKernelAbstraction.uninstallMBean(JmxKernelAbstraction.java:175)
| at org.jboss.ejb3.JmxKernelAbstraction.uninstall(JmxKernelAbstraction.java:202)
| at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:585)
| at org.jboss.ejb3.Ejb3Module.stopService(Ejb3Module.java:107)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
| 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.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.stop(Unknown Source)
| at org.jboss.system.ServiceController.stop(ServiceController.java:508)
| 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)
| 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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy33.stop(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.stop(EJB3Deployer.java:532)
| 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)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.stop(DeployerInterceptor.java:111)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptorSupport.java:196)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:99)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy34.stop(Unknown Source)
| at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
| at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:659)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
| at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.java:516)
| 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)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.server.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:1058)
| at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:1033)
| at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:996)
| Caused by: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the an initialized application
| at org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36)
| at org.jboss.seam.contexts.Lifecycle.beginCall(Lifecycle.java:84)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:113)
| at org.jboss.seam.intercept.RootInterceptor.invokeAndHandle(RootInterceptor.java:84)
| at org.jboss.seam.intercept.SessionBeanInterceptor.preDestroy(SessionBeanInterceptor.java:68)
| 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.ejb3.interceptor.LifecycleInvocationContextImpl.proceed(LifecycleInvocationContextImpl.java:131)
| at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.preDestroy(LifecycleInterceptorHandler.java:131)
| ... 104 more
| 16:44:58,421 WARN [JmxKernelAbstraction] jboss.j2ee:ear=...
|
Well, cause is pretty obvious, but what to do against em?
Thank you in advance,
Greetz GHad
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085093#4085093
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085093
18 years, 9 months
[JBoss Seam] - Re: Batch removing, conversations and transaction management
by v.masterov@gmail.com
Unfortunately cascade remove setting is not the way for me, as the entities intended for deletion can be referenced by other entities (i.e. there are references from other entities and the entity under deletion is not aware of such references). For each iteration I need to perform entity deletion attempt. As a result I want the entites without any references to be deleted while the entities with references or referenced by other entities left unchanged. I agree that nested conversation approach is not the best way. If all entities are deleted within a single transaction, there is no way to delete entities without references, if there is at least one entity with references in the batch. That is why I want to implement deletion through separate transactions. And the only way to manage transactions in JBoss AS when working with JBoss Seam is through conversations.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085089#4085089
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085089
18 years, 9 months
[JBoss Seam] - Re: How to hide
by supernovasoftware.com
I have been using .xhtml for a long time and it works perfectly.
Here is a stripped down version of my web.xml that integrates Richfaces and Trinidad.
<?xml version="1.0" ?>
| <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" version="2.5">
|
| <!-- Ajax4jsf -->
| <context-param>
| <param-name>org.ajax4jsf.SKIN</param-name>
| <param-value>blueSky</param-value>
| </context-param>
|
| <!-- Seam -->
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
| <filter>
| <filter-name>Seam Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
| <servlet>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
| </servlet>
| <servlet-mapping>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <url-pattern>/seam/resource/*</url-pattern>
| </servlet-mapping>
|
| <!-- Facelets -->
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <!-- JSF -->
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.xhtml</url-pattern>
| </servlet-mapping>
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>server</param-value>
| </context-param>
|
| <!-- Trinidad - as suggested by a4j-trinidad example-->
| <context-param>
| <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
| <param-value>com.sun.facelets.FaceletViewHandler</param-value>
| </context-param>
| <filter>
| <filter-name>Trinidad</filter-name>
| <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>Trinidad</filter-name>
| <url-pattern>*.xhtml</url-pattern>
| <dispatcher>REQUEST</dispatcher>
| <dispatcher>FORWARD</dispatcher>
| <dispatcher>INCLUDE</dispatcher>
| </filter-mapping>
| <context-param>
| <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
| <param-value>false</param-value>
| </context-param>
| <servlet>
| <servlet-name>Trinidad Resources</servlet-name>
| <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
| </servlet>
| <servlet-mapping>
| <servlet-name>Trinidad Resources</servlet-name>
| <url-pattern>/adf/*</url-pattern>
| </servlet-mapping>
|
| <!-- Security -->
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>Secure Content</web-resource-name>
| <url-pattern>*.xhtml</url-pattern>
| </web-resource-collection>
| <auth-constraint>
| <role-name>AuthorizedUser</role-name>
| </auth-constraint>
| <user-data-constraint>
| <transport-guarantee>NONE</transport-guarantee>
| </user-data-constraint>
| </security-constraint>
| <login-config>
| <auth-method>BASIC</auth-method>
| <realm-name>The Restricted Zone</realm-name>
| </login-config>
| <security-role>
| <description>The role required to access restricted content</description>
| <role-name>AuthorizedUser</role-name>
| </security-role>
|
| <!-- Welcome files -->
| <welcome-file-list>
| <welcome-file>index.xhtml</welcome-file>
| </welcome-file-list>
|
| </web-app>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085086#4085086
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085086
18 years, 9 months
[JBoss Seam] - tags c:forEach and ui:repeat
by denis.zjukow
Hello,
Having struggled for a couple of days I finally gave up and decided to ask for help.
I use Seam with Facelets. What I want is to show a list of entities in a table cell i.e a single cell may contain a comma-separted list.
Let's say I have two entity types: Item and Subitem. An instance of type Item may have a number of Subitems. In my case the relation between these two entity types is many-to-many.
So if I have Item1 with three subitems: Subitem1, Subitem2 and Subitem3, I want to see something like this:
| <table>
|
| ...
|
| <tr>
|
| ...
|
| <td>Subitem1,SubItem2,Subitem3</td>
|
| ...
|
| </tr>
|
| ...
|
| </table>
|
Please note that I don't want a comma after the last subitem in a cell (Subitem3 in this case). Nothing special, an obvious requierment, isn't it?
The first thing I tried was ui:repeat:
| <!-- Table, each row represents an item. -->
| <h ataTable value="items" var="item">
|
| ...
|
| <!-- This is my tricky column. -->
| <h:column>
|
| <!-- I want to see all subitems in a single cell. -->
| <ui:repeat value="#{item.subitems}" var="subitem">
|
| <!-- Show a subitem. -->
| <h utputText value="#{item.subItems}" />
|
| <!-- Add separator. -->
| <h utputText value="," />
|
| </ui:repeat>
| <h:column>
|
| ...
|
| </h ataTable>
|
Everything's fine except for the fact that there is a nasty comma after the last subitem. This made me try c:forEach tag:
| ...
|
| <!-- I want to see all subitems in a single cell. -->
| <c:forEach items="#{item.subitems}" var="subitem" varStatus="stat">
|
| <!-- Show a subitem. -->
| <h utputText value="#{item.subItems}" />
|
| <!-- Add separator for each subitem except for the last one. -->
| <c:if test="#{!stat.last}">
| <h utputText value="," />
| </c:if>
|
| </ui:repeat>
|
| ...
|
Unfortunately this code won't work! It just leaves my favorite column empty. It seams that c:forEach do not see variable item.
I then tried to find a way to add the conditional logic to ui:repeat, but haven't managed to find anything like c:forEach's 'varStatus'.
Any ideas? Thank you all in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085083#4085083
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085083
18 years, 9 months