[JBoss Seam] - <s:convertEntity /> within pages.xml
by DamonChong
Hi,
I would like to pass a parameter from one seam page to another which is of type EJB3 entity. I am not sure if this is supported. I tried to use the <s:convertEntity> within pages.xml but could not get it to work (see details below). Lastly, if this is not supported, would the Seam team kindly consider supporting this feature? I will put up the request officially if there is any remote chance that it may be considered.
Many thanks in advance for any feedback. 8-)
In the first seam page, I have this entry in pages.xml
| <rule if-outcome="ViewEdit">
| <redirect view-id="/subfunc/viewEdit.xhtml">
| <param name="strain" value="#{searchStrainCtrl.selection}">
| <s:convertEntity />
| </param>
| </redirect>
| </rule>
|
...and in the second seam page, this is the entry to retrieve the page parameter in pages.xml.
| <page view-id="/subfunc/viewEdit.xhtml" login-required="true">
| <param name="strain" value="#{vedStrainCtrl.strain}">
| <s:convertEntity />
| </param>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116924#4116924
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116924
18 years, 3 months
[JBoss Seam] - UPDATED Maven2 example application for Seam2
by cory_prowse
Alrighty I have made good progress!
It works!
Sorta...
There seems to be a problem with either Embedded JBoss or Maven (most likely Maven).
As an aside, I had to roll back to Embedded JBoss beta2 as beta3 was failing with JMS related stuff.
The example application will fail to build, complaining about no default persistence unit in the deployment, which is due to the test classpath not including the src/test/resources/META-INF/persistence.xml
To make it work copy or move this file to src/main/resources/META-INF/persistence.xml
I'm confused why it isn't working as the META-INF directory in the test resources does contain another file that is picked up during the test by JBoss Embedded.
So it appears that Maven (or Embedded JBoss) is ignoring the persistence.xml file in the test resources!??
This is using Maven 2.0.8 which explicitly states in its release notes: anonymous wrote : MNG-3118 - Test-classes should come before classes in the classpath. This may slightly alter behavior of tests. The test-classes is now included first in the classpath to allow test resources to override normal runtime ones.
I do not want to use filters in Maven as this file should only be used in unit tests and not included in any packaged artifacts.
The updated example can be downloaded from here:
http://www.users.on.net/~cory_prowse/seamMavenExample-20080104.zip
I'm going to post the example app to the Maven users mailing list and see if anyone there knows what is going on.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116922#4116922
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116922
18 years, 3 months
[Persistence, JBoss/CMP, Hibernate, Database] - Error getting SQL Server connection
by bbleafs
For some reason I have started getting an error when my EJBs attempt to get a connection to my SQL Server database. I've never seen an exception like this, could someone help me with this:
org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7b7b0169:80b:477d42dc:34 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7b7b0169:80b:477d42dc:34 status: ActionStatus.ABORT_ONLY >))
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116917#4116917
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116917
18 years, 3 months
[EJB 3.0] - Unable to call Stateful Session bean
by fla83tn
Hi to all,
I've lost all the day trying to figure out why I'm not able to use a Stateful bean: I'm really disperated!
In my project I am able to call everything, except this Stateful bean! I've Stateless session, resources and so on!
I lookup correctly to the object, but I cannot cat it to the interface class. The Exception throwed is an IllegalCastException: $Proxy195 (althought the Proxy number change at each deployment).
It seems that the looked up object is not an instance of the interface!, althought the JNDI deploy it correctly! (see below)
This is the output of the JNDI view:
anonymous wrote :
|
| +- NewsCrawler (class: org.jnp.interfaces.NamingContext)
| | +- UserSessionFacadeBean (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy97 implements interface nc.session.facade.user.UserSessionFacadeLocal,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
| | | +- remote (proxy: $Proxy96 implements interface nc.session.facade.user.UserSessionFacade,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
| | +- UserStatefulBean (class: org.jnp.interfaces.NamingContext)
| | | +- remote (class: java.lang.Object)
| | | +- remoteStatefulProxyFactory (proxy: $Proxy68 implements interface org.jboss.ejb3.ProxyFactory)
| | +- AdminSessionFacadeBean (class: org.jnp.interfaces.NamingContext)
| | | +- remote (proxy: $Proxy93 implements interface nc.session.facade.admin.AdminSessionFacade,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
|
and this is the simple Stateful bean I want to call:
| package nc.session.stateful;
|
| import nc.gwt.client.dtos.*;
| import javax.ejb.Remote;
|
| @Remote
| public interface UserStateful{
| public boolean login();
| public boolean logout();
| public UserStateDTO isLogged();
| public void setUserDTO(UserDTO u);
| public void addHistoryToken(String token);
| }
|
|
|
|
| package nc.session.stateful;
|
| import java.util.List;
| import javax.ejb.Stateful;
| import nc.gwt.client.dtos.*;
|
| @Stateful
| public class UserStatefulBean implements UserStateful{
|
| private UserStateDTO status=new UserStateDTO(false);
|
| public boolean login(){
| status.setLogged(true);
| return true;
| }
| public boolean logout(){
| status.setLogged(false);
| return false;
| }
| public UserStateDTO isLogged(){
| return status;
| }
|
| public void setUserDTO(UserDTO u){
| status.setUserDTO(u);
| }
| public void addHistoryToken(String token){
| List<String> l=status.getHistory();
| l.add(token);
| status.setHistory(l);
| }
|
| }
|
Any Ideas?
Thanks in advanced, Flavio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116911#4116911
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116911
18 years, 3 months