[JBoss Seam] - Refreshing dataTable - Too many conversation
by FabBoco
Hi guys,
I actually need help from expert people.
I have a jsp page that shows a data table
| <f:view>
| <f:loadBundle basename="messages" var="msgs" />
| <h:form>
| <br>
| <t:dataTable id="cd" var="cd" preserveDataModel="false" value="#{cdList}" width="100%" ......>
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="titolo" />
| </f:facet>
| <h:outputText value="#{cd.titolo}" />
| </h:column>
| </t:dataTable>
| </h:form>
| </f:view>
|
and a session bean
| @Stateful
| @Name("TestManager")
| @Scope(ScopeType.SESSION)
| @Transactional
| public class TestManagerBean implements Serializable, TestManager
| {
| @PersistenceContext(type = PersistenceContextType.EXTENDED)
| private EntityManager em;
|
| @DataModel(value = "cdList")
| private List<Cd> cdList;
|
| public TestManagerBean()
| {
| }
|
| @Create
| public void create()
| {
| }
|
|
| @Factory("cdList")
| @Begin(join = true)
| public void findAll()
| {
| System.out.println("findAll");
|
| Query q = em.createQuery("select o from Cd o");
|
| cdList = q.getResultList();
| }
|
|
| @Remove
| @Destroy
| public void destroy()
| {
| }
|
| }
|
When the page is loaded the first time, the findAll function is called and the page shows the data correctly.
When the page is refreshed the findAll is not called again and the page doesn't show changes appened to the database.
So I decided to add the following function:
| public void onListLoad()
| {
|
| cdList = null;
|
| }
|
and I changed the pages.xml:
| <page view-id="/Test.jsp" action="#{TestManager.onListLoad}" />
|
Now refreshing the page the findAll function is recalled and all database changes are shown.
The problem is that A NEW CONVERSATION is started at each refresh.
I have tried many options that do not work:
1) annotate the onListLoad function with @Begin(join=true)
2) modify pages.xml
| <page view-id="/Test.jsp" action="#{TestManager.onListLoad}" >
| <begin-conversation join="true"/>
| </page
|
3) add a remoting call to onListLoad directly from the page:
| function startup()
| {
| Seam.Remoting.getContext().setConversationId(conversationId);
| Seam.Component.getInstance("TestManager").onListLoad(startupCallback);
| }
|
| function startupCallback(operation)
| {
| alert(Seam.Remoting.getContext().getConversationId());
| }
|
| .....
|
| <body onload="startup()">
|
| ......
|
|
Can anyone give me the right solution ?
Thank you
Ragards
Fabrizio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998243#3998243
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998243
19 years, 3 months
[Beginners Corner] - deployment failed
by yukito
I tried to startup jboss with D:\jboss\bin\run.bat -c default, and got following messages.A lot of wars depolied failed.My jboss version is 4.0.4 with jsdk 1.4.2_13.Already set jboss_home and java_home.Anyone has any idea about it?
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
rServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:
117)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.java:95)
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 $Proxy31.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
bstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.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(ServiceControl
ler.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.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 $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:464)
at java.lang.Thread.run(Thread.java:534)
20:34:42,187 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@ee171fea { url=file:/D:/jboss/server/default
/deploy/http-invoker.sar/invoker.war/ }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: URL file:/D:/jboss/server/default/deploy/htt
p-invoker.sar/invoker.war/ deployment failed
state: FAILED
watch: file:/D:/jboss/server/default/deploy/http-invoker.sar/invoker.war/WEB-I
NF/web.xml
altDD: null
lastDeployed: 1168000471375
lastModified: 1167831096000
mbeans:
org.jboss.deployment.DeploymentInfo@23213959 { url=file:/D:/jboss/server/default
/deploy/jbossweb-tomcat55.sar/ROOT.war/ }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: URL file:/D:/jboss/server/default/deploy/jbo
ssweb-tomcat55.sar/ROOT.war/ deployment failed
state: FAILED
watch: file:/D:/jboss/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/WEB
-INF/web.xml
altDD: null
lastDeployed: 1168000472531
lastModified: 1167831096000
mbeans:
org.jboss.deployment.DeploymentInfo@19b540f5 { url=file:/D:/jboss/server/default
/deploy/jbossws14.sar/jbossws.war }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: URL file:/D:/jboss/server/default/tmp/deploy
/tmp28127jbossws-exp.war/ deployment failed
state: FAILED
watch: file:/D:/jboss/server/default/deploy/jbossws14.sar/jbossws.war
altDD: null
lastDeployed: 1168000473843
lastModified: 1168000474000
mbeans:
org.jboss.deployment.DeploymentInfo@bec57e8e { url=file:/D:/jboss/server/default
/deploy/jbossws14.sar/ }
deployer: org.jboss.deployment.SARDeployer@1581593
status: Deployment FAILED reason: URL file:/D:/jboss/server/default/tmp/deploy
/tmp28127jbossws-exp.war/ deployment failed
state: FAILED
watch: file:/D:/jboss/server/default/deploy/jbossws14.sar/META-INF/jboss-servi
ce.xml
altDD: null
lastDeployed: 1168000473843
lastModified: 1167831094000
mbeans:
jboss.ws:service=ServiceEndpointManager state: Created
jboss.ws:service=WebServiceDeployerJSE state: Created
jboss.ws:service=WebServiceDeployerEJB21 state: Created
jboss.ws:service=WebServiceClientDeployer state: Created
jboss.ws:service=WebServiceDeployerNestedJSE state: Created
jboss.ws.eventing:service=SubscriptionManager state: Created
org.jboss.deployment.DeploymentInfo@9b68c386 { url=file:/D:/jboss/server/default
/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/ }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: URL file:/D:/jboss/server/default/deploy/jms
/jbossmq-httpil.sar/jbossmq-httpil.war/ deployment failed
state: FAILED
watch: file:/D:/jboss/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-htt
pil.war/WEB-INF/web.xml
altDD: null
lastDeployed: 1168000474343
lastModified: 1167831094000
mbeans:
org.jboss.deployment.DeploymentInfo@a0aed4e8 { url=file:/D:/jboss/server/default
/deploy/jms/jbossmq-httpil.sar/ }
deployer: org.jboss.deployment.SARDeployer@1581593
status: Deployment FAILED reason: URL file:/D:/jboss/server/default/deploy/jms
/jbossmq-httpil.sar/jbossmq-httpil.war/ deployment failed
state: FAILED
watch: file:/D:/jboss/server/default/deploy/jms/jbossmq-httpil.sar/META-INF/jb
oss-service.xml
altDD: null
lastDeployed: 1168000474343
lastModified: 1167831094000
mbeans:
jboss.mq:service=InvocationLayer,type=HTTP state: Started
org.jboss.deployment.DeploymentInfo@fcdb1be1 { url=file:/D:/jboss/server/default
/deploy/jmx-console.war/ }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: URL file:/D:/jboss/server/default/deploy/jmx
-console.war/ deployment failed
state: FAILED
watch: file:/D:/jboss/server/default/deploy/jmx-console.war/WEB-INF/web.xml
altDD: null
lastDeployed: 1168000481734
lastModified: 1167831094000
mbeans:
org.jboss.deployment.DeploymentInfo@6add287b { url=file:/D:/jboss/server/default
/deploy/servlet.war/ }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: URL file:/D:/jboss/server/default/deploy/ser
vlet.war/ deployment failed
state: FAILED
watch: file:/D:/jboss/server/default/deploy/servlet.war/WEB-INF/web.xml
altDD: null
lastDeployed: 1168000481984
lastModified: 1167832420000
mbeans:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.web.deployment:id=-300474390,war=invoker.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/http-invoker.sar/invoker.war/ deployment failed
ObjectName: jboss.web.deployment:id=589379929,war=ROOT.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/jbossweb-tomcat55.sar/ROOT.war/ deployment failed
ObjectName: jboss.web.deployment:id=431309045,war=jbossws.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/tmp/deploy/tmp28127jbossws-exp.war/ deployment failed
ObjectName: jboss.web.deployment:id=-1687633018,war=jbossmq-httpil.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/ deployment failed
ObjectName: jboss.web.deployment:id=1745875973,war=web-console.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/management/console-mgr.sar/web-console.war/ deployment failed
I Depend On:
jboss.admin:service=PluginManager
ObjectName: jboss.web.deployment:id=-52749343,war=jmx-console.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/jmx-console.war/ deployment failed
ObjectName: jboss.web.deployment:id=1792878715,war=servlet.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/servlet.war/ deployment failed
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.web.deployment:id=431309045,war=jbossws.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/tmp/deploy/tmp28127jbossws-exp.war/ deployment failed
ObjectName: jboss.web.deployment:id=1792878715,war=servlet.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/servlet.war/ deployment failed
ObjectName: jboss.web.deployment:id=-1687633018,war=jbossmq-httpil.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/ deployment failed
ObjectName: jboss.web.deployment:id=589379929,war=ROOT.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/jbossweb-tomcat55.sar/ROOT.war/ deployment failed
ObjectName: jboss.web.deployment:id=1745875973,war=web-console.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/management/console-mgr.sar/web-console.war/ deployment failed
I Depend On:
jboss.admin:service=PluginManager
ObjectName: jboss.web.deployment:id=-300474390,war=invoker.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/http-invoker.sar/invoker.war/ deployment failed
ObjectName: jboss.web.deployment:id=-52749343,war=jmx-console.war
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/D:/jboss/server/de
fault/deploy/jmx-console.war/ deployment failed
20:34:42,281 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0
-8080
20:34:42,484 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
20:34:42,515 INFO [JkMain] Jk running ID=0 time=0/140 config=null
20:34:42,531 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBos
s_4_0_4_GA date=200605151000)] Started in 29s:406ms
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998242#3998242
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998242
19 years, 3 months
[JBoss jBPM] - Scheduler problems jbpm.war(3.1.3) to jboss as 4.0.5GA
by JesperB
I have spent the last couple of days trying to get the scheduler to work on JBoss 4.0.5 GA but when a task with a timer is executed the 'scheduler' is not found.
I have downloaded the 3.1.3 jbpm starter kit and modded it to work (as in previous posts).
I have copied the jbpm.sar and the jbpm.war to the dir. I removed dom4j and jaxen jars from the war (hence it is already included in the jboss dist) and added the following in the web.xml to load the scheduler thread.
| <!-- jBPM SchedulerServlet -->
| <servlet>
| <servlet-name>SchedulerServlet</servlet-name>
| <servlet-class>org.jbpm.scheduler.impl.SchedulerServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>SchedulerServlet</servlet-name>
| <url-pattern>/scheduler</url-pattern>
| </servlet-mapping>
|
I have verified that the scheduler is running:
| ...
| DEBUG [Scheduler] starting the scheduler
| ...
| DEBUG [CommandExecutorThread] waiting for more messages
| DEBUG [JbpmContextInfo] creating jbpm context with service factories '[message, scheduler, authentication, persistence, logging]'
| DEBUG [JbpmContext] creating JbpmContext
| DEBUG [DbPersistenceServiceFactory] creating persistence service
| DEBUG [DbPersistenceService] creating hibernate session
| DEBUG [DbPersistenceService] beginning hibernate transaction
| DEBUG [SchedulerThread] checking for timers
| DEBUG [JbpmContext] closing JbpmContext
| DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@1d427b1
| DEBUG [DbPersistenceService] committing hibernate transaction
| DEBUG [DbPersistenceService] closing hibernate session
|
This is the code that creates and executes the process:
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
| "<process-definition>" +
| " <start-state>" +
| " <transition to='executeAction' />" +
| " </start-state>" +
| " <node name='executeAction'>" +
| " <transition to='timedAction' />" +
| " <action class='se.pertexo.test.workflow.TestAction' />" +
| " </node>" +
| " <node name='timedAction'>" +
| " <timer name='timer1' duedate='15 seconds'/>" +
| " <transition to='end' />" +
| " <action class='se.pertexo.test.workflow.TestAction' />" +
| " </node>" +
| " <end-state name='end' />" +
| "</process-definition>"
| );
|
| ProcessInstance processInstance =
| new ProcessInstance( processDefinition );
|
| Token token = processInstance.getRootToken();
| logger.info( " Starting workflow" );
|
| token.signal();
|
The TestAction code:
| public class TestAction implements ActionHandler
| {
| private static Logger logger = Logger.getLogger( TestAction.class );
|
| public void execute(ExecutionContext executionContext) throws Exception
| {
| logger.info( "Test action: execute");
| executionContext.getToken().signal();
| }
| }
|
The first nodes action is executed and signals the transition to the timer task, this is the log and exception I get:
| 11:35:33,058 INFO [TestBean] -----> Testing jBPM <-----
| 11:35:33,151 INFO [TestBean] Starting workflow
| 11:35:33,167 INFO [TestAction] Test action: execute
| 11:35:33,167 ERROR [GraphElement] action threw exception: service 'scheduler' unavailable
| org.jbpm.svc.JbpmServiceException: service 'scheduler' unavailable
| at org.jbpm.svc.Services.getCurrentService(Services.java:86)
| at org.jbpm.svc.Services.getCurrentService(Services.java:76)
| at org.jbpm.scheduler.def.CreateTimerAction.execute(CreateTimerAction.java:66)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
| at org.jbpm.graph.def.Node.enter(Node.java:301)
| at org.jbpm.graph.def.Transition.take(Transition.java:119)
| at org.jbpm.graph.def.Node.leave(Node.java:383)
| at org.jbpm.graph.exe.Token.signal(Token.java:178)
| at org.jbpm.graph.exe.Token.signal(Token.java:123)
| at se.sqs.production.workflow.TestAction.execute(TestAction.java:22)
|
My question is:
Where does the scheduler get registered with the JbpmContext?
Is there anything else that I have missed?
Regards
Jesper
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998231#3998231
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998231
19 years, 3 months
[JBoss Portal] - IPC using application variables
by louise_za
Hi everyone
I have 2 porlets on a portal page. I would like Portlet A to set an application variable when a link is clicked in the portlet's body. Portlet B must then read this variable and display it. The problem is that Portlet B renders before Portlet A and the variable it displays is consequently always 1 step behind what A set.
The code in Portlet A to set the variable is in the processAction method and looks as follows:
| String id = aRequest.getParameter("id");
| aResponse.setRenderParameter("id", id);
| PortletSession ps = aRequest.getPortletSession();
| ps.setAttribute("id", id, PortletSession.APPLICATION_SCOPE);
|
The code in Portlet B (in the jsp page):
| String object_id = (String)request.getSession().getAttribute("id");
|
Is there something that I am doing wrong or is this just a limitation in the portal architechture?
(I am using JBoss portal 2.2 bundled)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998227#3998227
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998227
19 years, 3 months