[jboss-user] [JBoss Seam] - Re: Question about SeamTest

2007-11-08 Thread joris77
Hi,

We would like to use the seamtest but, we use junit already and are not 
planning to switch test framework. Not because I like junit or testng better 
but I just like to stick with one testing framework. 

Joris wijlens

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102877#4102877

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102877
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: POJO with conversational scope

2007-03-28 Thread joris77
Henrik

Thanks for your reply. I am sorry. I think I haven't been quite clear. 

There is one method with a @Begin anotation (doSomething)  and two methods with 
an @End annotation. After the @Begin method is called and has returned to the 
client, the client does a postback (with a h:commandButton) to a method 
(doAnotherThing) on the bean. The  instance variable person (annotated as an 
entity) has the value of null in doAnotherThing while it had been set to a non 
null value in the @Begin annotated method (doSomething).

Like this

...
  | @Name("depot")
  | @Scope(ScopeType.CONVERSATION)
  | public class Depot {
  | 
  | @Logger
  | private Log log;
  | 
  | private Person person;
  | 
  | 
  |@Begin
  |public void doSomething(){
  |person = ...;
  |}
  | 
  |public String doAnotherThing(){
  |... = person; // here the value of person is null
  |}
  | 
  |@End
  |public void ..
  | 
  | ...

This is is logical when I compare this to the logging I get because the POJO is 
destroyed and recreated. But it doesn't meet my expectations for a conversation 
scoped component. I expect the component to be stored somewhere over requests.

My most important question is are my expectations correct?

Joris

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032643#4032643

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032643
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - POJO with conversational scope

2007-03-28 Thread joris77
I have a POJO that i want to use as a Seam bean with conversational scope and I 
have an entity "Person" that I store as an instance variable/javabean property 
on that POJO. Like this ...


  | ...
  | @Name("depot")
  | @Scope(ScopeType.CONVERSATION)
  | public class Depot {
  | 
  | @Logger
  | private Log log;
  | 
  | private Person person;
  | ...

What I expect is that if the instance variable is set after the first request 
(I do that in my code) of the conversation that it remains there until the 
conversation is ended by the @End annotation of one of depot's action methods.

Is this correct?

In reality after the first postback from the client the instance variable is 
null.

If I take a look in my logging I see that my javabean is created and destroyed 
each request:


  | 00:49:45,171 INFO  [STDOUT] Constructing depot
  | 00:49:45,171 WARN  [AbstractEntityManagerImpl] Calling joinTransaction() on 
a non JTA EntityManager
  | 00:49:45,171 INFO  [Depot] Create depot
  | 00:49:45,234 WARN  [AbstractEntityManagerImpl] Calling joinTransaction() on 
a non JTA EntityManager
  | 00:49:45,312 INFO  [STDOUT] Hibernate: select material0_.id as id4_, 
material0_.version as version4_, material0_.created_by as created3_4_, 
material0_.created_on as created4_4_, material0_.last_modified_by as last5_4_, 
material0_.last_modified_on as last6_4_, material0_.description as 
descript7_4_, material0_.blocked as blocked4_, material0_.material_type as 
material11_4_, material0_.bar_code as bar9_4_, material0_.reason_for_blocking 
as reason10_4_ from material material0_ where material0_.bar_code=?
  | 00:49:45,359 INFO  [STDOUT] Hibernate: select materialty0_.id as id5_0_, 
materialty0_.version as version5_0_, materialty0_.created_by as created3_5_0_, 
materialty0_.created_on as created4_5_0_, materialty0_.last_modified_by as 
last5_5_0_, materialty0_.last_modified_on as last6_5_0_, materialty0_.name as 
name5_0_, materialty0_.description as descript8_5_0_ from material_type 
materialty0_ where materialty0_.id=?
  | 00:49:45,406 INFO  [STDOUT] Hibernate: select checkout0_.id as id1_, 
checkout0_.version as version1_, checkout0_.created_by as created3_1_, 
checkout0_.created_on as created4_1_, checkout0_.last_modified_by as last5_1_, 
checkout0_.last_modified_on as last6_1_, checkout0_.person as person1_, 
checkout0_.material as material1_, checkout0_.checkin_date as checkin7_1_, 
checkout0_.checkout_date as checkout8_1_ from checkout checkout0_ where 
checkout0_.material=? and (checkout0_.checkin_date is null)
  | 00:49:45,453 INFO  [STDOUT] Hibernate: select person0_.id as id2_0_, 
person0_.version as version2_0_, person0_.created_by as created3_2_0_, 
person0_.created_on as created4_2_0_, person0_.last_modified_by as last5_2_0_, 
person0_.last_modified_on as last6_2_0_, person0_.last_name as last7_2_0_, 
person0_.middle_name as middle8_2_0_, person0_.initials as initials2_0_, 
person0_.bar_code as bar10_2_0_ from person person0_ where person0_.id=?
  | 00:49:45,531 WARN  [AbstractEntityManagerImpl] Calling joinTransaction() on 
a non JTA EntityManager
  | 00:49:45,562 INFO  [Depot] Destroy depot
  | 

I am afraid I am missing the point here, somebody explain me how conversations 
are supposed to work?

Do POJO conversations differ from EJB conversations?

Thanks anyway,

Joris Wijlens

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032581#4032581

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032581
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user