[JBoss Portal] - Re: Portlet markup fragment
by TrieuSkull
Hi there,
This is the answer.
The fragments produced by WSRP and JSR168 must be valid HTMLor XHTML
fragments (depending on the content type of the request) but other than
that no special syntax is mandated by the specs.
The URLs however that are included in the markup and that semanatically
point back to the portlet (e.g. as an action or a render URL) need to
comply with some rules:
JSR168: all action/render URLs must be generated via the JSR168 API. No
assumption about the structure of these URL must be made, they need to be
written as-is onto the output stream
WSRP: all action/render URLs need to either use rewriting templates or
syntactically match the rewrite URL format as defined by the specification.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990859#3990859
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990859
18 years, 1 month
[JBoss Seam] - Seam + jBPM cant get it to work
by kasim
Ok i have lookd at this for a while and maybe i am just not getting it. thought i was .... but i cant seem to get the tasks to show up.
I have this business process definition -
| <?xml version="1.0"?>
|
| <process-definition name="TicketingSystem">
|
| <start-state name="start">
| <transition to="waiting"/>
| </start-state>
|
| <task-node name="waiting" end-tasks="true">
| <task name="task-assignment" description="Tasks waiting for assignment">
| <assignment pooled-actors="ticket-user"/>
| </task>
|
| <transition name="cancel" to="cancelled"/>
| </task-node>
|
| <task-node name="working" end-tasks="true">
| <task name="task-working" description="Tasks are rassigned to be workable">
| <assignment actor-id="user"/>
| </task>
|
| <transition name="done" to="finished"/>
| <transition name="done" to="finished"/>
| <transition name="cancel" to="cancelled"/>
| </task-node>
|
| <end-state name="finished"/>
| <end-state name="cancelled"/>
| </process-definition>
|
|
I have this code creating my process
|
| @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
| long ticketId;
| @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
| String owner;
|
| @CreateProcess(definition="TicketingSystem")
| public String createTicket() {
| log.info("TicketSystem - create - #{ticket}");
| log.info("Using actor - #{actor} ");
|
| // ticket is not complete cause we just started it.
| ticket.setTicketComplete(false);
|
| em.persist(ticket);
|
| // save the fields
| ticketId = ticket.getTicketId();
| owner = ticket.getOwner();
|
| return "/ticket_list.xhtml";
| }
|
So i login .... set an actor id to "user" ... then submit the ticket.
and i have the xhtml ...
| <h1>Tasks</h1>
| <h2>Task Assignment</h2>
| <c:choose>
| <c:when test="#{empty pooledTaskInstanceList}">
| <p>There are no pooled tasks to be assigned.</p>
| </c:when>
| <c:otherwise>
| <h:dataTable value="#{pooledTaskInstanceList}"
| var="task"
| styleClass="dvdtable"
| headerClass="dvdtablehead"
| rowClasses="dvdtableodd,dvdtableeven"
| columnClasses="dvdtablecol">
| <h:column>
| <f:facet name="header">Ticket Id</f:facet>
| #{task.variables['ticketId']}
| </h:column>
| <h:column>
| <f:facet name="header">Name</f:facet>
| <h:outputText value="#{task.name}" />
| </h:column>
| <h:column>
| <f:facet name="header">Owner</f:facet>
| #{task.variables['owner']}
| </h:column>
| <h:column>
| <s:link action="#{pooledTask.assignToCurrentActor}" taskInstance="#{task}"
| value="Assign" linkStyle="button"/>
| </h:column>
| </h:dataTable>
| </c:otherwise>
| </c:choose>
|
| <h2>Task Assignment</h2>
| <c:choose>
| <c:when test="#{empty pooledTaskInstanceList}">
| <p>There are no pooled tasks to be assigned.</p>
| </c:when>
| <c:otherwise>
| <h:dataTable value="#{taskInstanceList}"
| var="task"
| styleClass="dvdtable"
| headerClass="dvdtablehead"
| rowClasses="dvdtableodd,dvdtableeven"
| columnClasses="dvdtablecol">
| <h:column>
| <f:facet name="header">Ticket Id</f:facet>
| #{task.variables['ticketId']}
| </h:column>
| <h:column>
| <f:facet name="header">Name</f:facet>
| <h:outputText value="#{task.name}" />
| </h:column>
| <h:column>
| <f:facet name="header">Owner</f:facet>
| #{task.variables['owner']}
| </h:column>
| <h:column>
| <s:link action="#{pooledTask.assignToCurrentActor}" taskInstance="#{task}"
| value="Assign" linkStyle="button"/>
| </h:column>
| </h:dataTable>
| </c:otherwise>
| </c:choose>
|
| <h2>Order Acceptance</h2>
| <c:choose>
| <c:when test="#{empty taskInstanceListForType['approve']}">
| <p>There are no orders to be accepted.</p>
| </c:when>
| <c:otherwise>
| <h:dataTable value="#{taskInstanceListForType['approve']}"
| var="task"
| styleClass="dvdtable"
| headerClass="dvdtablehead"
| rowClasses="dvdtableodd,dvdtableeven"
| columnClasses="dvdtablecol">
| <h:column>
| <f:facet name="header">Ticket Id</f:facet>
| #{task.variables['ticketId']}
| </h:column>
| <h:column>
| <f:facet name="header">Name</f:facet>
| <h:outputText value="#{task.name}" />
| </h:column>
| <h:column>
| <f:facet name="header">Owner</f:facet>
| <h:outputText value="#{task.owner}" />
| </h:column>
| <h:column>
| <s:link action="#{accept.viewTask}" taskInstance="#{task}"
| value="Review" linkStyle="button"/>
| </h:column>
| </h:dataTable>
| </c:otherwise>
| </c:choose>
|
|
| </body>
|
Now shouldnt something show up there???
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990857#3990857
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990857
18 years, 1 month
[JBoss Seam] - Re: Excessive [could not destroy component] 1.1B1 to 1.1CR1
by gus888
Hi Gavin,
Frankly, I don't really know how to set session timeout. I tried to add the following code in web.xml:
| <session-config>
| <session-timeout>3</session-timeout>
| </session-config>
Then I login into system, after having waited for a while. I got the following exception. My destroy code is set in a super class which is extended by a SFSB.
| @Destroy @Remove
| public void destroy() {
|
| }
The exception:2006-12-03 22:17:13,781 WARN [org.jboss.seam.contexts.Contexts] Could not destroy component: documentExplorer
| javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 5c4o04-cpvdto-eva7zhnz-1-evadcepo-64
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:268)
| at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.removeSession(StatefulRemoveInterceptor.java:127)
| at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:87)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy564.destroy(Unknown Source)
| at com.cvn.controller.common.BaseExplorer$$FastClassByCGLIB$$65feb1d8.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:30)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
| at com.cvn.controller.document.DocumentExplorer$$EnhancerByCGLIB$$1f36ee84.destroy(<generated>)
| 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.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1793)
| at org.jboss.seam.Component.callDestroyMethod(Component.java:1749)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:189)
| at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:230)
| at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:45)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
| at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
| at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
| at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
| at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1284)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
| at java.lang.Thread.run(Thread.java:595)
|
Did I do anything wrong above? Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990856#3990856
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990856
18 years, 1 month
[EJB 3.0] - Problems with ManyToMany with non-existing child entity inse
by fowlks@msu.edu
Hello, All
I've hit a minor snag in my understanding of ManyToMany relationships with EJB3. In a nutshell, I have a Post Entity which as a ManyToMany relationship with a Keyword Entity. I'm decided to create my own junction table. The Keyword table has a unique key constraint on the keyword field.
The Issue:
I can persist new Post entities with non-existing Keywords entities (e.g. Keywords that don't exist in the database ) But , When I attempt to attach
an existing Keyword entity to a non-persisted Post object the persist fails for the following reason.
org.hibernate.PersistentObjectException: detached entity passed to persist: com.example.web.jList.ejb.entity.Keyword
My understanding:
What i'm expecting is that if i attach an existing Keyword entity to the Post entity then i should have a new row in my Post/Keyword junction table.
I main question is what am i doing wrong?
JBoss 4.0.5GA JEMS install with EJB3 support
My database looks like so:
Post Table idtitledescriptionpostdatelogin_idprohibitedevents_id
1Moving Sale Everything must GO!!!!Test2006-11-16 19:22:02101
2Once's in a life time Sale!!!!Test 22006-11-16 19:22:02102
Post/Keyword Junction Table
idposts_idkeywords_id
113
224
311
416
515
621
Keyword Table
idcountversionkeyword
100car
200tools
300toys
400computers
500babys toys
600car parts
| // In my Post Entity
| @ManyToMany( fetch = FetchType.EAGER , cascade = CascadeType.ALL)
| @JoinTable( name="keyword_posts_junc",
| joinColumns={@JoinColumn(name="posts_id")},
| inverseJoinColumns={@JoinColumn(name="keywords_id")} )
| public Set<Keyword> getKeywords() {
| return keywords;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990853#3990853
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990853
18 years, 1 month