[JBoss Seam] - Re: Scope and Best Practices
by chubby
Thank you for the prompt response and for the Wiki!
I've been working on a paging and sortable datatable view, but kept fumbling around with parameters (firstRow, noRows, sort column, etc) and how best to pass them around/scope them.
I landed on a temporary conversation and using page parameters for the parameters not explicitly used in the page (sort column). It seems to work, but was wondering if changing it to a long running conversation made more sense. But then I worried about the "lingering" conversation if the user navigated away in an unexpected way. As you said in the Wiki, perhaps its not worth worrying about since it will eventually time out.
I'll take a look at the Seam gen tool as suggested as well and see how does things.
Thanks again!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037407#4037407
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037407
19 years
[JBoss Seam] - Need help on deploying seam-mail example!
by gus888
Hi there,
I tried to deploy the mail example of Seam-CVS20070414 into JBoss4.0.5GA, but I always got the following exceptions. Any guidance will be very appreciative. Thank you very much in advance.
org.jboss.deployment.DeploymentException: url file:/D:/Servers/jboss-4.0.5.GA/server/default/deploy/jbossws.sar/activation.jar could not be opened, does it exist?
| at org.jboss.deployment.DeploymentInfo.<init>(DeploymentInfo.java:214)
| at org.jboss.deployment.MainDeployer.parseManifestLibraries(MainDeployer.java:1137)
| at org.jboss.deployment.MainDeployer.init(MainDeployer.java:884)
| ....
|
| org.jboss.deployment.DeploymentException: url file:/D:/Servers/jboss-4.0.5.GA/server/default/deploy/jbossws.sar/jsr173_1.0_api.jar could not be opened, does it exist?
| at org.jboss.deployment.DeploymentInfo.<init>(DeploymentInfo.java:214)
| at org.jboss.deployment.MainDeployer.parseManifestLibraries(MainDeployer.java:1137)
| ....
|
| org.jboss.deployment.DeploymentException: url file:/D:/Servers/jboss-4.0.5.GA/server/default/deploy/jbossws.sar/jaxb1-impl.jar could not be opened, does it exist?
| at org.jboss.deployment.DeploymentInfo.<init>(DeploymentInfo.java:214)
| at org.jboss.deployment.MainDeployer.parseManifestLibraries(MainDeployer.java:1137)
| ....
|
| 2007-04-15 18:38:41,203 DEBUG [org.jboss.cache.TreeCache] failed looking up TransactionManager, will not use transactions
| javax.naming.NameNotFoundException: TransactionManager not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| ....
|
| 2007-04-15 18:38:55,406 DEBUG [org.jboss.system.ServiceController] starting service meldware.mail:type=MailServices,name=UserEditor
| 2007-04-15 18:38:55,484 WARN [org.buni.meldware.mail.usereditor.db.DBUserEditorImpl] could not create user or role table
| 2007-04-15 18:38:55,484 ERROR [STDERR] java.lang.RuntimeException: java.sql.SQLException: Table already exists: MAIL_USERS in statement [CREATE TABLE MAIL_USERS]
| 2007-04-15 18:38:55,484 ERROR [STDERR] at org.buni.meldware.mail.usereditor.db.DBUserEditorImpl.executeStatement(DBUserEditorImpl.java:189)
| 2007-04-15 18:38:55,484 ERROR [STDERR] at org.buni.meldware.mail.usereditor.db.DBUserEditorImpl.start(DBUserEditorImpl.java:156)
| 2007-04-15 18:38:55,484 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| ....
|
| 2007-04-15 18:38:55,593 DEBUG [org.jboss.mq.pm.jdbc2.PersistenceManager] Could not create table with SQL: CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
| java.sql.SQLException: Table already exists: JMS_MESSAGES in statement [CREATE CACHED TABLE JMS_MESSAGES]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
| at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
| at org.jboss.mq.pm.jdbc2.PersistenceManager.createSchema(PersistenceManager.java:277)
| at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1796)
| ....
|
| 2007-04-15 18:38:55,593 DEBUG [org.jboss.mq.pm.jdbc2.PersistenceManager] Could not create table with SQL: CREATE CACHED TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) )
| java.sql.SQLException: Table already exists: JMS_TRANSACTIONS in statement [CREATE CACHED TABLE JMS_TRANSACTIONS]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
| at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
| at org.jboss.mq.pm.jdbc2.PersistenceManager.createSchema(PersistenceManager.java:352)
| at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1796)
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037406#4037406
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037406
19 years
[Messaging, JMS & JBossMQ] - Re: Using CsIL
by fawce
Hi Markus,
The sample application has been added to cvs, along with some instructions for use. I also added a new binary download that includes the new samples and instructions. You should be able to use the sample application to validate your jboss configuration. I tried to put everything into the step by step how to, so please let me know if you find any discrepancies. Once you have a working configuration, you should be able to reference the source code to the sample application to get your own client code working.
You should be able to reach everything via http://sourceforge.net/projects/csil/
Good luck, and please let me know if you encounter any further issues.
Just guessing, but I think you probably had a port conflict between XIL2 and UIL2, which ships with the default JBoss4.0.5 distribution. I've updated the default XIL2 configuration to use a different port.
Thanks for using CSIL,
fawce
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037404#4037404
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037404
19 years
[JBoss Seam] - Re: Scope and Best Practices
by fhh
anonymous wrote :
| I can see how its not scalable to keep a large data model in memory for the duration of a user's session, but it seems equally non-scalable to query the database each time the user interacts with the page it supports.
|
I consider both bad practice. You should only fetch the data you actually need - not the whole data from the database. If you're resultset is large you should scroll over the resultset and fetch only the data actually displayed.
This is where converstations come in. You can have different subsets of a resultset to display in different windows. This is not possible with session scope as the results would overwrite each other.
The other advantage is that you can "clean out" the conversation context with a single annotation while you have to remove components from session scope explicitly.
However sometimes you do want that data is shared between different browser windows. This is were you have to use session scope.
anonymous wrote :
| I thought I'd ask the users how they use Scope?
|
IMHO it boils down to this: If your user is only using a single browser instance and you never and your long running converation performance will be exactly like using session scope. If your user uses multiple browser windows to access your application that do not share data you have to use conversations. If you end conversation now and then you will save memory compared to using session scope you do not clean.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037402#4037402
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037402
19 years
[JBoss Seam] - Scope and Best Practices
by chubby
Hello,
I'm very new to Seam and have been searching around the documentation and forums for some guidelines and best practices with regard to component scope.
The documentation mentions in several places that SESSION scope is frowned upon and/or used sparingly. Yet, nearly all the examples use it, especially those dealing with the DataModel.
I can see how its not scalable to keep a large data model in memory for the duration of a user's session, but it seems equally non-scalable to query the database each time the user interacts with the page it supports.
I've experimented with long running conversations, etc, but then I have to make sure I end the conversation somehow when the user navigates away from the page.
I guess before I get myself too contorted trying to figure out the best way to do something, I thought I'd ask the users how they use Scope. When do you use SESSION and when do you use CONVERSATION? Do you use long running or the temporary conversations? If long running, how to handle the user jumping to another page via a link or bookmark?
Also, if you have a page with a table for example that supports paging, what scope do you use?
Thanks in advance for your help,
Mark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037399#4037399
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037399
19 years