[jboss-user] [JBoss Seam] - Re: Need help with Timer in Seam application
nhieb
do-not-reply at jboss.com
Mon Jul 30 09:14:16 EDT 2007
Thanks for responses!
Seam
Created-By: 1.5.0_07-87 ("Apple Computer, Inc.")
Seam-Version: 1.2.1.GAImplementation-Version: 1.2.1.GA
Also, wise_guybg, you are correct about the org.jboss.seam.notLoggedIn" component in components.xml/ Howerver, removing that doesn't solve the problem. It throws NotLoggedInExcpetion while trying to load the entity. The funny thing i noticed is the following.
If i load an entity that doesn't have a collection (lazy fetch type), the entity is loaded fine. but when i am trying to get entity with collections, the excpetion is thrown. Even the authentification in method doesn't solve that problem
Identity identity = new Identity();
| identity.setUsername(TEST_USERNAME);
| AuthenticatorImpl authenticator = new AuthenticatorImpl();
| authenticator.setIdentity(identity);
| authenticator.setEntityManager(em);
| authenticator.setLog(Logging.getLog(Authenticator.class));
| authenticator.authenticate();
| authenticator.setActor(new Actor());
I have a temproraily fix -getting the properties this way
Query query= em.createQuery
| ("select new map(r.id as id, r.amount as amount, r.createdDate as created, " +
| "r.dueDate as due, r.reference as reference, r.status as status, r.createdBy as who) " +
| "from WireTransferRequest r where r.dueDate >= :beginDate and r.dueDate <= :endDate"+
| " and r.status<>:status" )
| .setParameter("beginDate", beginDate)
| .setParameter("endDate", endDate)
| .setParameter("status", Status.TRANSMITTED);
and then creating objects and setting the pulled properties, but still wondering if there is a nice fix for that
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068714#4068714
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068714
More information about the jboss-user
mailing list