[JBoss Seam] - nested datatables with s:link
by lcoetzee
Hi,
I want to nest datatable, with the inside loop containing a s:link with an action.
Something like:
| <t:dataList value="#{sections}" var="currentSection" layout="simple"
| rendered="#{not empty sections}" id="dt1">
| <li>#{currentSection.sectionLabel}
| <t:dataList value="#{currentSection.questions}"
| var="currentQuestion" layout="simple"
| rendered="#{not empty currentSection.questions}" id="dt2">
| <li><s:link action="#{questionSelectionBean.selectQuestion}" id="selectQuestion">#{currentQuestion.questionLabel}</s:link></li>
| </t:dataList>
|
| </ul>
| </li>
| </t:dataList>
|
Each section has several questions associated with it (section is annotated with a @DataModel).
It displays nicely, but as yet I have no clue how to get hold of the selected "currentQuestion" in my SFSB method (questionSelectionBean.selectQuestion).
Any ideas ?
Thanks
Louis
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958276#3958276
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958276
19 years, 9 months
[EJB 3.0] - Re: Entity bean state not rolled back on TX rollback:
by jnorris10
Just for any that are interested in this thread, here is what the spec says about this:
anonymous wrote :
| EJB3 Persistence Specification, page 54
|
| 3.3.2 Transaction Rollback
|
| For both transaction-scoped and extended persistence contexts, transaction rollback causes all pre-existing managed instances and removed instances [15] to become detached. The instances? state will be the state of the instances at the point at which the transaction was rolledback. Transaction rollback typically causes the persistence context to be in an inconsistent state at the point of rollback. Inparticular, the state of version attributes and generated state (e.g., generated primary keys) may be inconsistent.
| Instances that were formerly managed by the persistence context (including new instances that were made persistent in that transaction) may therefore not be reusable in the same manner as other detached
| objects?for example, they may fail when passed to the merge operation.[16]
|
| ...
|
| [16] It is unspecified as to whether instances that were not persistent in the database behave as new instances or detached instances after rollback. This may be implementation-dependent.
|
I personally am curious why full blown @Entity property rollback isn't in the spec. Perhaps in the big picture it's not as useful as I think it is.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958274#3958274
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958274
19 years, 9 months
[JBoss Portal] - Using JGuard to secure the portal
by pelo67000
Hello,
I would like to use jguard with pentaho (which is deployed on JBoss 4.03) to secure the portal.
After downloading the jguard zip and install it, i was able to launch start-pentaho.bat but i had the following errors :
anonymous wrote :
| 2006-07-07 10:55:29,984 WARN [org.jboss.system.ServiceController] Problem starting service portal:service=CMS
| java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/ lang/String;)V
| at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
| at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
| at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
| at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
| at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
| at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
| at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
| at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
| at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:362)
| ............
|
anonymous wrote :
| [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: portal:service=CMS
| State: FAILED
| Reason: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/ lang/String;)V
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| portal:service=JAASLoginModule
| Depends On Me:
| portal:mapper=CMSObject
|
| ObjectName: portal:service=TreeCache,type=persistent
| State: FAILED
| Reason: java.lang.NoClassDefFoundError
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| Depends On Me:
| portal:service=TreeCacheProvider,type=persistent
|
| ObjectName: portal:service=Hibernate
| State: FAILED
| Reason: java.lang.NoClassDefFoundError
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| Depends On Me:
| portal:service=Module,type=User
| portal:service=Module,type=Role
|
| ObjectName: portal:service=Hibernate,type=globalinstance
| State: FAILED
| Reason: java.lang.NoClassDefFoundError
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| Depends On Me:
| portal:container=Instance,type=global
|
| ObjectName: portal:service=Hibernate,type=globalportal
| State: FAILED
| Reason: java.lang.NoClassDefFoundError
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| Depends On Me:
| portal:container=PortalObject,type=global
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: portal:service=Hibernate,type=globalportal
| State: FAILED
| Reason: java.lang.NoClassDefFoundError
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| Depends On Me:
| portal:container=PortalObject,type=global
|
| ObjectName: portal:service=CMS
| State: FAILED
| Reason: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/ lang/String;)V
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| portal:service=JAASLoginModule
| Depends On Me:
| portal:mapper=CMSObject
|
| ObjectName: portal:service=Hibernate,type=globalinstance
| State: FAILED
| Reason: java.lang.NoClassDefFoundError
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| Depends On Me:
| portal:container=Instance,type=global
|
| ObjectName: portal:service=Hibernate
| State: FAILED
| Reason: java.lang.NoClassDefFoundError
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| Depends On Me:
| portal:service=Module,type=User
| portal:service=Module,type=Role
|
| ObjectName: portal:service=TreeCache,type=persistent
| State: FAILED
| Reason: java.lang.NoClassDefFoundError
| I Depend On:
| jboss.jca:name=PortalDS,service=DataSourceBinding
| Depends On Me:
| portal:service=TreeCacheProvider,type=persistent
|
However, my jguard example worked... (pentaho didn't work at this time)
I have resolved this problem, Jguard needs asm-2.0 when jboss uses asm 1.5.03, i have also change the cglib from /jboss/server/default/lib/ with the latest cglib-nodep version...
I don't have errors anymore but my jguard example don't really work because i have only access to the login,logon and access denied pages which is according to the jguard forum the basic accessible pages...
However, if i comment this part of the /jboss/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml
anonymous wrote :
| <mbean
| code="org.jboss.portal.server.deployment.WebAppAdapter"
| name="portal:deployer=Adapter"
| xmbean-dd="org/jboss/portal/server/deployment/WebAppAdapter.xml">
| portal:deploymentFactory=Object
| portal:deploymentFactory=PortletApp
| portal:deploymentFactory=Layout
| portal:deploymentFactory=LayoutFeatures
| portal:deploymentFactory=Theme
| portal:service=Module,type=User
| portal:service=Module,type=Role
| portal:service=Module,type=Mail
| <depends optional-attribute-name="Deployer" proxy-type="attribute">portal:deployer=PortalWebApp
| <depends optional-attribute-name="InterceptedDeployer">jboss.web:service=WebServer
|
I obtain approximatively the same errors that the second quoted errors and my jguard example work again....
So i deduce that my problem comes from the portal configuration but i don't know where or what search....
Can you please help me ?
Thanks for your response !
Jérémy
(French student)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958273#3958273
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958273
19 years, 9 months
[JBoss Seam] - Ajax4JSF experiences
by gavin.king@jboss.com
OK, so I spent some time playing with JSF yesterday afternoon. Overall I'm pretty happy with the APIs but....
So, what I've noticed so far is:
(0) <a4j:region> is required in MyFaces, as per Ajax4JSF docs (ugly!)
(1) <a4j:region selfRendered="true"> breaks with Seam, probably some problem to do with phase listeners/filters
(2) <a4j:region selfRendered="false"> is totally broken, at least in JSP/MyFaces. Might be OK in facelets and/or the RI
(3) The echo example works with a <h:outputText> as the component to be re-rendered, but not with a <h:inputText>
Does anyone know how to solve any of these problems?
Ajax4JSF is implemented as a servlet filter instead of as a custom UIViewRoot (which is the route that Jacob/Ed/Adam have been going down).
The Ajax4JSf docs hint that the difference b/w the UIViewRoot implementations in MyFaces and the RI is what causes problems in MyFaces, which leads me to wonder if they really should be replacing the viewroot. Furthermore, it seems to be their hacked lifecycle that causes probelm (1) on Seam. However, it might be that Ajax4JSF is doing extra stuff compared to what is in facelets CVS (Ajax4JSF seems to do partial restores as well as partial renders).
Anyway, my conclusion is that this stuff needs some serious work to be usable...
I will contact the Exadel guys next week probably.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958272#3958272
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958272
19 years, 9 months
[Persistence, JBoss/CMP, Hibernate, Database] - Using LIMIT in EJBQL
by WGPuckett
I have JBoss v4.0.3SP1 installed along with MySQL v5.0.22.
I am using Eclipse 3.1.2 with MyEclipse 4.1.1 for my development. I am using XDoclet to generate the code for the EJBs.
In my application I have my CMP EJBs configured for v2.X.
In one of my EJBs I have the following finder:
| * @ejb.finder
| * query="SELECT OBJECT(t) FROM TaxMaster t WHERE t.taxNbr >= ?1 ORDER BY t.taxNbr"
| * signature="java.util.Collection findListByTaxNbr(java.lang.String partialKey)"
| * description="find the list of entries that start with a specific character string"
|
When I run this the DAOImp module fails with
| javax.servlet.ServletException: Unexpected Error
| java.lang.OutOfMemoryError: Java heap space
| ; CausedByException is:
| Unexpected Error
| java.lang.OutOfMemoryError: Java heap space
|
|
Obviously JBoss is trying to read every entry in the table that satisfies the query and load it into memory. This won't work at all.
According to the JBoss documentation I can include a LIMIT parm on the QL call. So I changed the QL to:
| * @ejb.finder
| * query="SELECT OBJECT(t) FROM TaxMaster t WHERE t.taxNbr >= ?1 ORDER BY t.taxNbr ASC LIMIT ?2"
| * signature="java.util.Collection findListByTaxNbr(java.lang.String partialKey, int tLimit)"
| * description="find the list of entries that start with a specific character string"
|
Now when I attempt to deploy the application I get the following failure:
| 10:56:42,111 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'TaxMaster' to jndi 'TaxMasterLocal'
| 10:56:43,736 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "LIMIT" at line 1, column 79.
| Was expecting one of:
| <EOF>
| "," ...
|
So, how do I implement the LIMIT option? I don't mind to upgrade to a more current version if that will fix the problem. But I'd rather not go to that touble just yet if it won't help.
I have researched this somewhat and can't find anything in the forums that indicate that JBoss has a problem with LIMIT. So I am hoping I am just doing something wrong.
Thanks for your interest and feedback.
Glenn Puckett
MetaMAP, Inc
Lexington, KY
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958269#3958269
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958269
19 years, 9 months
[Beginners Corner] - JBoss goes down!
by nabieh
Dears,
We have an application that been used by a 600 users via netowrk connections over the country, at a time, not less than 150 users are online using the application, the main goal of the application is to be an interface for a huge database and oter network components, we are facing a strange behavior of the application server - JBoss, from time to time, it goes down and became unaccessible, and it seems that the application is not able to run any more. I monitored the logs and found lot of exceptions regarding JDBC result sets exceptions says: java.sql.SQLException: Exhausted Resultset, I am sure we are closing every single connection/statement/result set we used! Can any one advice me on this field? We are using DAOs for DB conections, we use JNDI for retrieving datasourses, we cach those common used info into memory, we are using HP servers which considered to be v. good machines. Any comment will be highly appreciated, thanks in advance.
Note: We have lot of those requests that waits for responses for a period of time, and lot of those requests beeing executed at a time all the day. Those requests goes to queues and wait for the reply as XML from other queues, we are using IBM MQ services.
Nabieh.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958267#3958267
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958267
19 years, 9 months