[JBoss Seam] - @DataModel vs. EL
by mykey
I am displaying a list of entities (Student) with a @DataModel on a JSF Page with two links: one for editing and one for delting. For some reason the injection by DataModelSelection does not work correctly. My my status-EL messages for these two functions aren't shown correctly. Deletin entities works (except for the status message) whereas editing does not.
This is my SFSB:
| @Stateful
| @Scope(ScopeType.SESSION)
| @Name("inscription")
| public class InscriptionAction implements InscriptionFacade {
|
| @Logger private Log log;
| @PersistenceContext(type=PersistenceContextType.EXTENDED) private EntityManager em;
| @DataModel private List<Student> studentList;
|
| @In(required=false)
| @Out(required=false)
| @DataModelSelection
| private StudentInsc inscribben; // StudentInsc inherits Student
|
| public String delete() {
| //
| // This log shows only "Deleting inscribben student"
| //
| log.info("Deleting inscribben student #{inscribben.givenName} #{inscribben.familyName}");
| studentList.remove(inscribben);
| StudentInsc stud = em.merge(inscribben);
| em.remove(stud);
|
| return "insc";
| }
|
| public String startEdit() {
| //
| // This log shows only "Start editing"
| //
| log.info("Start editing #{inscribben.givenName} #{inscribben.familyName}");
| em.merge(inscribben);
| return "editInsc";
| }
|
| public String finishEdit() {
| //
| // This log shows the correct values from the form "Finish editing Newname Newfamilyname"
| // but doesn't merge the inscribben student to the database
| //
| log.info("Finish editing #{inscribben.givenName} #{inscribben.familyName}");
|
| em.merge(inscribben);
| return "insc";
| }
|
| [....]
|
This is my table:
|
| <rich:dataTable value="#{studentList}" var="stud" rendered="#{studentList.rowCount>0}" >
| [....]
|
| <rich:column><s:link action="#{inscription.startEdit}" value="#{stud.givenName} #{stud.familyName}" /></rich:column>
| <rich:column><s:link action="#{inscription.delete}" value="delete" /></rich:column>
|
| [....]
| </rich:dataTable>
|
|
startEdit redirects to a form, where new values can be entered. On a button click finishEdit is invoked and the DataTable is shown again.
I've already tried a lot, but nothing worked. Can somebody please help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125754#4125754
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125754
18 years, 2 months
[Installation, Configuration & DEPLOYMENT] - help me understand memory usage
by javatwo
On Linux FC 6. The machine physical memory is 4G.
After machine reboot, start JBoss and deploy application, the total memory usage is about 700M. After running JBoss for several hours, the memory used is increased to 3.5G.
$ ps -eo rss
Adding all used memory up, the total is about 580M. where does the rest memory go?
$ top
Tasks: 95 total, 2 running, 93 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.2%hi, 0.0%si, 0.0%st
Mem: 4037992k total, 3456532k used, 581460k free, 626264k buffers
Swap: 10223608k total, 0k used, 10223608k free, 2119340k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12529 root 25 0 2502m 388m 43m S 0 9.9 1:27.33 java
2584 root 15 0 326m 114m 3596 S 0 2.9 1491:46 yum-updatesd
2404 mysql 15 0 246m 26m 4236 S 0 0.7 1:28.03 mysqld
the JBoss (java): 388M.
Please help me.
Thanks
Dave
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125751#4125751
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125751
18 years, 2 months
[Remoting] - Remoting 2.4.0.Beta1 available
by ron.sigal@jboss.com
JBossRemoting 2.4.0.Beta1 is now available. It includes a number of improvements over Remoting 2.2.x; e.g.:
* Support for server configuration by microcontainer injection
* Support for multihome servers
* Better support for IPv6 addresses
* Improvements in the socket transport
* Improved connection monitoring
* Server gets client address in invocations
* Multiple bug fixes
Remoting 2.4.0 is meant to be compatible with Remoting 2.2.x, in the sense that you should be able to replace an old jar with a new jar and experience no disruptions. Many of the changes are internal improvements which have no impact on the API. There are new features which involve additional configuration options, new methods, and new classes, but existing functionality should remain intact.
The new jboss-remoting.jar can be found in the repository: http://repository.jboss.com/jboss/remoting/2.4.0.Beta1
The distribution with source can be found at: http://labs.jboss.com/jbossremoting/downloads/
==========================================================================================================
Release Notes - JBoss Remoting - Version 2.4.0.Beta1 (Pinto)
** Bug
* [JBREM-166] - JMXConnectorServer will not start if using rmi invoker elsewhere
* [JBREM-645] - Need to cleanup locatorURI parsing
* [JBREM-675] - Problems with Servlet invoker
* [JBREM-717] - servlet invoker illegal state exception not serializable
* [JBREM-731] - Address of secondary server socket should be acquired each time a control connection is created.
* [JBREM-743] - For polling callback handler, org.jboss.remoting.Client.addListener() should create only one CallbackPoller per InvokerCallbackHandler
* [JBREM-745] - client unable to send if server recycles
* [JBREM-747] - org.jboss.remoting.transport.Connector should unregister server invoker from MBeanServer
* [JBREM-752] - SSLSocket runs into BindException
* [JBREM-754] - Reset timeout on each use of HttpURLConnection
* [JBREM-766] - Guard against "spurious wakeup" from Thread.sleep()
* [JBREM-769] - Sucky error message when identity creation fails
* [JBREM-771] - MicroSocketClientInvoker can experience socket leaks
* [JBREM-772] - MicroRemoteClientInvoker.establishLease() creates two LeasePinger TimerTasks
* [JBREM-774] - BisocketClientInvoker.replaceControlSocket() and handleDisconnect() should close control socket
* [JBREM-775] - MicroSocketClientInvoker.initPool() should omit pool from log message
* [JBREM-778] - BisocketServerInvoker.start() creates a new static Timer each time
* [JBREM-779] - BisocketClientInvoker should guard agains scheduling on an expired Timer, part 2
* [JBREM-784] - Use separate maps for control sockets and ordinary sockets in BisocketClientInvoker
* [JBREM-785] - BisocketClientInvoker.transport() inadvertently uses listenerId member variable
* [JBREM-786] - stale sockets can be gotten from pool even with current rety logic
* [JBREM-787] - Move network i/o in BisocketClientInvoker constructor to handleConnect()
* [JBREM-788] - Access to BisocketClientInvoker static maps should be synchronized in handleDisconnect()
* [JBREM-790] - NPE in BisocketClientInvoker$PingTimerTask
* [JBREM-793] - Lease should synchronize access to client map
* [JBREM-794] - LeasePinger.addClient() should not create a new LeaseTimerTask if none currently exists
* [JBREM-806] - In HTTPClientInvoker remove newlines and carriage returns from Base64 encoded user names and passwords
* [JBREM-811] - Privileged Block to create Class Loader
* [JBREM-813] - ServletServerInvoker should return an exception instead of just an error message
* [JBREM-820] - Fix race in ServerInvokerCallbackHandler.handleCallback()
* [JBREM-821] - JBoss Remoting fails under load
* [JBREM-822] - Avoid deadlock when Connector shuts down while callback client invoker is in handleConnect()
* [JBREM-838] - allow user to set content-type for http responses (part 2: ServletServerInvoker)
* [JBREM-843] - MicroSocketClientInvoker can miscount number of active sockets
* [JBREM-846] - Fix race in JNIDDetector
* [JBREM-851] - In LeasePinger and TimerUtil replace Timer if it has shut down
* [JBREM-853] - ServletServerInvoker should not put null URL path in metadata map
* [JBREM-863] - CLONE -Infinite loop in BisocketClientInvoker.createSocket [JBREM-845]
* [JBREM-866] - CLONE -Eliminate delay in MicroSocketClientInvoker.getConnection() [JBREM-860]
* [JBREM-870] - CLONE -MaxPoolSize value should be used in key to MicroSocketClientInvoker.connectionPools [JBREM-858]
* [JBREM-874] - CLONE -HTTP Client invoker doesn't throw exceptions when using the sslservlet protocol [JBREM-871]
* [JBREM-887] - ServerInvokerrCallbackHandler.createCallbackErrorHandler() inadvertently references callbackStore
* [JBREM-888] - Client side connection exception is not thrown on the client side when the lease times out
* [JBREM-890] - Fix thread pool eviction in socket transport
* [JBREM-895] - MicroSocketClientInvoker.transport() must check for timeout after invocation attempt.
** Feature Request
* [JBREM-298] - Need ability to add transport specific info to invocation payload
* [JBREM-480] - Insure reliable tests in socket invoker for unusable socket connections.
* [JBREM-643] - configuration for multi-homed server invokers
* [JBREM-701] - add timeout config per client invocation for transports not descended from socket transport
* [JBREM-728] - Improve access to HTTP response headers
* [JBREM-746] - need to be able to tell ServerInvokerServlet to use the platform MBean server
* [JBREM-749] - BisocketServerInvoker: Make configurable the address and port of secondary server socket
* [JBREM-755] - Make ConnectorValidator parameters configurable
* [JBREM-756] - CallbackPoller should shut down if too many errors occur.
* [JBREM-758] - Associate remote socket address with the invocation
* [JBREM-765] - Add a separate timeout parameter for callback clients
* [JBREM-792] - Provide to the client local address of a TCP/IP connection, as seen from the server
* [JBREM-797] - BisocketClientInvoker.PingTimerTask should terminate more gracefully
* [JBREM-798] - Implement quick Client.removeListener() for polled callbacks, part 2
* [JBREM-799] - Add a separate timeout parameter for callback clients, part 2
* [JBREM-804] - Enable HTTPClientInvoker to accept NO_THROW_ON_ERROR configuration by way of InvokerLocator
* [JBREM-868] - CLONE -Update build.xml to allow jdk 1.5 compiler to target JVM version 1.4 (JBREM-855)
* [JBREM-875] - CLONE -Have ServerInvokerCallbackHandler register as connection listener [JBREM-873]
* [JBREM-891] - ConnectionValidator should report if lease has expired
** Patch
* [JBREM-781] - Socket transport needs to provide to the client local address of a TCP/IP connection, as seen from the server
** Release
* [JBREM-801] - Release 2.4.0.Beta1
** Task
* [JBREM-63] - Get rid of the legacy configuration that embeds xml parsing
* [JBREM-557] - need to include all the transports within the tests.versioning ant target
* [JBREM-641] - re-implement the callback polling for http transport to reduce latency
* [JBREM-687] - allow binding to 0.0.0.0
* [JBREM-706] - In socket transport, prevent client side oneway invocations from artificially reducing concurrency
* [JBREM-710] - Correct occasional failures of org.jboss.test.remoting.transport.socket.load.SocketLoadTestCase
* [JBREM-713] - Check if jbossweb can replace tomcat jars for the http server invoker
* [JBREM-715] - Don't log error for exception thrown by application in org.jboss.remoting.transport.socket.ServerThread.
* [JBREM-730] - JNDIDetector should use rebind() instead of bind() to add new local detection messages
* [JBREM-733] - When org.jboss.remoting.Client.addListener() creates a Connector, it should pass in InvokerLocator parameters with configuration map.
* [JBREM-735] - BisocketClientInvoker.PingTimerTask should try multiple times to send ping.
* [JBREM-760] - Change port for shutdown tests.
* [JBREM-767] - Avoid deadlock in callback BisocketClientInvoker when timeout == 0
* [JBREM-768] - Fix ShutdownTestCase failures
* [JBREM-777] - Add quiet="true" in clean task of build.xml
* [JBREM-782] - Remove network i/o from synch block in ServerInvokerCallbackHandler.getCallbackHandler()
* [JBREM-783] - Remove network i/o from synch blocks that establish and terminate LeasePingers
* [JBREM-800] - Adjust timout values to avoid cruisecontrol failures
* [JBREM-807] - Fix failing org.jboss.test.remoting.transport..shutdown tests
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125748#4125748
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125748
18 years, 2 months
[JBoss Seam] - Re: Using rich:datascroller With Seam and Hibernate Paginati
by neilac333
Thanks to everyone for their insight. I have got something that seems to be working. I don't know if it is the most elegant code ever written, but I will be happy to write up the general solution on SeamFramework.org. Just let me know where, Pete.
For those who might be interested, let me first point out I have three components working together:
1) An action component that interacts with the user
2) A persistence component that abstracts all the search APIs
3) My own SerializedDataModel which is bijected from my Seam action component.
The action component basically takes the search parameters from the user and passes them to the persistence component. That component returns the results to the action, which then passes them to the SerializedDataModel, which wraps the information in a HashMap by key as specified in the examples and Jason Long's code.
As for the paging, when the user wants a different page of results (either by clicking one of the navigation buttons or by clicking an actual page number), the action component uses the DataScrollerEvent passed to the listener method within to figure out where the user wants to go next. The action component passes the desired page number to the persistence component, which of course is handling all the result paging. The persistence component then passes back the results for the desired page, and we do all the data passing around I described above.
Again, I will be happy to elaborate further on SeamFramework.org since I think this will be a common issue for developers until RichFaces comes up with a better way to handle this.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125746#4125746
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125746
18 years, 2 months
[JBoss Seam] - Re: Join natural conversation ? how ??
by enda
My working solution that is such a hack but now I see the power we have ;D
Please comment it or provide better solution
| public String select(Team team) {
| conversationId = team.getId().toString();
| ConversationEntries.getInstance().updateConversationId(Conversation.instance().getId(),
| conversationId);
| Set<String> existingIds = ConversationEntries.getInstance().getConversationIds();
| for (String existingConversationId : existingIds) {
| String[] split = existingConversationId.split(":");
|
| if(split.length == 2 && conversationId.equals(split[1])) {
|
| getFacesMessages().add("Conversation already exists");
| ConversationEntries.getInstance().getConversationEntry(existingConversationId).
| redirect();
| return null;
|
| }
| }
|
| return super.select(team);
| }
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125745#4125745
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125745
18 years, 2 months
[JBoss Seam] - Join natural conversation ? how ??
by enda
Hey I do not think that it is possible to merge your named conversation as you have in documentation in general example?
| <h:commandLink
| action="#{teamManager.select(team)}" value="select">
| <s:conversationName value="teamHome"/>
| </h:commandLink>
|
| <conversation name="teamHome"
| parameter-name="teamName"
| parameter-value="team-#{team.id}"/>
|
As I understand from your documentation I have to use <s:conversationName value="teamHome"/> in my link to merge conversations, but I make my conversation name by team.id that is what the best choice is ;D. But how can they join them when team is going to be selected and and I am already asking for its id, even though that it is not selected yet!
ex.
existing Conv1 -> team.id=1
new Conv2 -> team.id=null ; select(team) ; team.id=1 => crash
it takes value from team.id=null
Did I miss something in documentation?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125743#4125743
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125743
18 years, 2 months