[JBoss Seam] - How to update @DataModel and its ListDataModel?
by bfo81
I have an Entity Person (my favorite example *g*) and a page that lists all instances.
Here are some code snippets, believe me, it's simple ;).
The class delivering the list:
| @Stateful @Scope(ScopeType.SESSION) @Name("personList")
| public class ....
| ...
| @DataModel
| private List<Person> persons;
|
| @Factory("persons")
| @Observer("personChanged")
| public void loadList() {
| person = em.createQuery("from Person");
| log.info("Persons are: " + persons);
| }
| ...
|
The JSF:
| ...
| <h:dataTable var="person" value="#{persons}">
| ....
| </h:dataTable>
|
Well, whenever a person is changed, added or deleted, the "personChanged" event is fired. This works perfectly, since the log always shows that really the newest state of all persons has been fetched from the database. If I just changed "John Doe" to "John Sixpack" then the change is shown in the persons variable immediately.
BUT: The underlying ListDataModel (@DataModel wraps the java.util.List into a org.jboss.seam.jsf.ListDataModel) is only up to date after deleting or adding a Person, namely changing the number of all entries. If I change an existing Person then the ListDataModel doesn't change and the overview page shows the old status.
So the List is up to date, the ListDataModel isn't (I found this out by adding a toString() method to ListDataModel that shows the wrapped data und outputting it via <h:outputText value="#{persons}" />).
QUESTION:
* How can I tell the ListDataModel that it should update its wrapped data?
* Why does this only work automatically when changing the length of a list? (I'm curious ;))
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962112#3962112
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962112
18 years, 5 months
[Installation, Configuration & Deployment] - Incomplete Deployment when EJB turn into webservices
by gurjeetjsr@jboss.com
i converted EJB to webservices when i am runing jboss-4.0.2, at the time of deployment jboss successfully deploy all EJBs except that EJB, which i converted into webservices. it shows in log
16:15:54,421 INFO [EjbModule] Deploying ITransferMgr
16:15:54,437 INFO [EjbModule] Deploying IMMaintMgr
16:16:01,796 ERROR [StatelessSessionContainer] Initialization failed jboss.j2ee:
jndiName=WireCtlr,service=EJB
java.lang.NoSuchMethodException: Not found in bean class: public abstract void j
avax.ejb.EJBObject.remove() throws java.rmi.RemoteException,javax.ejb.RemoveExce
ption
at org.jboss.ejb.SessionContainer.setUpBeanMappingImpl(SessionContainer.
--------------------------------------------------------------------
but my WSDL published successfully, it shows in log
---------------------------------------------------------------------
16:16:32,125 INFO [EJBDeployer] Deployed: file:/D:/jboss-4.0.2/server/default/d
eploy/datamate.jar
16:16:36,156 INFO [WSDLFilePublisher] WSDL published to: file:/D:/jboss-4.0.2/s
erver/default/data/wsdl/datamate.jar/WireCtlr.wsdl
16:16:37,125 INFO [AxisService] WSDD published to: D:\jboss-4.0.2\server\defaul
t\data\wsdl\datamate.jar\WireCtlr.wsdd
16:16:39,484 INFO [AxisService] Web Service deployed: http://datav1:8080/datama
te/WireCtlr
---------------------------------------------------
and at last server is showing
---------------------------------------------------
16:17:23,359 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:jndiName=WireCtlr,service=EJB
State: FAILED
Reason: java.lang.NoSuchMethodException: Not found in bean class: public abstr
act void javax.ejb.EJBObject.remove() throws java.rmi.RemoteException,javax.ejb.
RemoveException
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:jndiName=WireCtlr,service=EJB
State: FAILED
Reason: java.lang.NoSuchMethodException: Not found in bean class: public abstr
act void javax.ejb.EJBObject.remove() throws java.rmi.RemoteException,javax.ejb.
RemoveException
16:17:28,437 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-808
0
16:17:30,984 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
16:17:31,046 INFO [JkMain] Jk running ID=0 time=0/203 config=null
16:17:31,109 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4
_0_2 date=200505022023)] Started in 3m:5s:0ms
----------------------------------------------------------------------
i have given
<service-endpoint>dm.ejb.common.WireCtlr</service-endpoint> in ejb-jar.xml for that EJB.
anybody can tell me why i am getting that error, why my ejb get failed to deploy.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962108#3962108
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962108
18 years, 5 months