[JBoss Seam] - Seam Examples
by lightbulb432
I have some questions after taking a look at the Seam booking example.
1) How does going to /seam-booking automatically redirect to /seam-booking/home.seam? I don't see anything in web.xml or pages.xml where this behavior has been configured.
2) In the example's pages.xml there is a no-conversation-view-id attribute for the pages element and a conversation-required attribute for some of the page elements. I noticed that everytime I access a page with a conversation-required, it redirects to the no-conversation-view-id...is this the purpose of these two attributes? (i.e. The conversation-required page redirects to the no-conversation-view-id page when no conversation exists?)
3) When I click the "Register New User" link on the home.seam page, there's a cid in the address bar. Now when I go to a conversation-required page it still forwards to home.seam rather than going to the page I requested...why? A conversation now exists...
4) When a conversation-required page redirects to the no-conversation-view-id page, a conversation starts! (e.g. you enter confirm.seam and it forwards to home.seam?cid=1) Why is a conversation starting here...I don't see anything in pages.xml or any @Begin to indicate this...
5) All the action methods seem to have a return type of void rather than String...is this the new recommended way of making action methods because of pages.xml?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005629#4005629
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005629
19 years, 3 months
[Installation, Configuration & Deployment] - Failed to connect to localhost:1099
by gaulakh
I am running JBoss_4_0_3_SP1 on a Windows 2000 evironment.
I am trying to run my server instance (named DAS) on a different set of ports. I have looked into the bindings.xml file and modified the second instance (the one with JNDI port = 1199) and changed the server name to DAS. I then commented out the first instance. I then changed the DAS/conf/jboss-service.xml file to have the server name = DAS as well.
When I start the application up I get the following error.
[org.jboss.ejb.StatelessSessionContainer:1324] End java:comp/env for EJB: ApplicationSetupSession
[org.jnp.interfaces.NamingContext:1375] Failed to connect to localhost:1099
javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
The application starts up fine when I have it run as the first instance (the one with JNDI = 1099).
There is no code in the application that sets the JNDI port to 1099.
I am at a loss on what the problem is. Does anyone know what could be causing JBOSS to try to connect to port 1099 on startup even though I have configured the bindings.xml file to tell it to bind to 1199?
The only other thing I could think of is that my application does make use of JMS. As well I have some MDB's that are singletons that use the DefaultJMSProvider. Is it a JMS setting that I have missed?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005616#4005616
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005616
19 years, 3 months
[EJB 3.0] - JPQL, Postgres and nulls
by ghinkle
I am wondering if anyone has been able to effectively use null jpql parameter bindings with postgres version 8+.
The story is this. I have columns that are nullable. I want to search by them finding nulls if i pass in a null parameter or where they match if i pass in a non-null parameter. Now JPQL by spec has gone with SQL-92 style null comparisons so null != null, but null is null. This means to do above I either a) need two queries (one for a null param, one for non-null) and or b) I need to put them together.
a) Need to use an if statement to choose the query if param is null
SELECT a from Apple a WHERE a.col is null
SELECT a from Apple a WHERE a.col = :parameter
b) One query, but fails on pg8+
SELECT a from Apple a
WHERE (:parameter is null and a.col is null) or a = :parameter
Now here's where the postgres problem comes in. With PG 8+ they prepare the statements on the server side for real and bind each parameter. Prior to pg8 they just stuffed string versions of bind parameters into the query string, leaving the server to figure out the parameter type.
The problem is of course that even if PreparedStatement.setNull is being called it wouldn't know what type to pass in for my query. Postgres blows up with a "operator does not exist: integer = bytea".
Finally, I can get this working with protocolVersion=2, but that is inefficient and screws up other things that I need to work. Option a) is also not a good option when you have multiple nullable columns in a query (you'd need all combinations). Anybody have any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005610#4005610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005610
19 years, 3 months