[JBoss-user] [JBoss Seam] - Where is application/session scoped component stored?

2006-05-02 Thread liudan2005
In order to maximise the performance load, I need to know more about how seam works. Since every call is proxied to ejb container from servlet container, where all the application and session states stored? are they stored in Servlet container, or in Ejb container? Say if I inject a session sco

[JBoss-user] [JBoss Seam] - Unable to start a converstaion from a @Factory method

2006-05-02 Thread liudan2005
I have a statful bean with following method: | @Factory("foo") | @Begin(join=true) | public String myMethod(){ | ... | } | When this method is triggered by click a command button, it'll start a converstaion. This is expected behaviour. However, when it's triggered from @Factory("fo

[JBoss-user] [JBoss Seam] - Seam CR1 is not compatiable with Jboss CR2

2006-05-03 Thread liudan2005
It works fine with jboss CR1 but not CR2. Here is the exception when deploying booking example. --- MBeans waiting for other MBeans --- ObjectName: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=bookingDatabase State: NOTYETINSTALLED View the original post :

[JBoss-user] [JBoss Seam] - Re: Seam CR1 is not compatiable with Jboss CR2

2006-05-03 Thread liudan2005
Sorry I forgot to use the latest Seam (got so many versions here now). It works now with the latest build from cvs. Thanks. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3940921#3940921 Reply to the post : http://www.jboss.com/index.html?module=bb&op=postin

[JBoss-user] [EJB 3.0] - Entity inheritance question

2006-05-03 Thread liudan2005
If I call person.getPets(), it will return all Cats and Dogs. Is there a way to retrive only cat or dog? e.g. person.getPets(only need cat) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3940960#3940960 Reply to the post : http://www.jboss.com/index.html?modu

[JBoss-user] [EJB 3.0] - callback listener is not triggered when sub collection is up

2006-05-03 Thread liudan2005
I have a @PreUpdate method, which works fine when the entity is being updated. However, if only the entity's referece collection is updated, the @PreUpdated method is not triggered. e.g. this works person.setAge(...); em.persist(person); this doesn't work person.getPets().add(dog); em.persist(p

[JBoss-user] [EJB 3.0] - Re: callback listener is not triggered when sub collection i

2006-05-04 Thread liudan2005
anyone knows? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941249#3941249 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3941249 --- Using Tomcat but need to do mor

[JBoss-user] [EJB 3.0] - Re: Entity inheritance question

2006-05-04 Thread liudan2005
anyone knows? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941250#3941250 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3941250 --- Using Tomcat but need to do mor

[JBoss-user] [EJB 3.0] - Re: Entity inheritance question

2006-05-05 Thread liudan2005
thanks for your suggestion. my person object is passed around in a transaction and it doesn't know whether it needs cats or dogs by the time it's selected. there's no way i can do this unless i retrive person from the database again. it would be nice to know how others handle this situation.

[JBoss-user] [JBoss Seam] - the bookmarded url has conversationId when using redirect in

2006-05-22 Thread liudan2005
I've been having problem with bookmark pages for a couple of days and hope to get someone's help here. let me describe my scenario in short. Say I can list many shops and each shop can sell many items. Each shop has got its own id, so they can be accessed by a bookmakable url (e.g. http://abcd.

[JBoss-user] [JBoss Seam] - Re: the bookmarded url has conversationId when using redirec

2006-05-22 Thread liudan2005
Thanks for reply. Without creating a converstaion, how can I pass the objects between invocations? Here is what I've tried for my second approach by having 2 seperate beans: | @Stateless | @Name("shopAction") | public class ShopAction ... | { | @RequestParameter | String i

[JBoss-user] [JBoss Seam] - Inject object that is outjected from a stateless ejb.

2006-05-25 Thread liudan2005
Is it possible to inject object that is outjected from a stateless ejb? I've been having this problem for a couple of days now and really hope to get a solution here. I have a stateless ejb which is triggered from a bookmarked url. here is what it looks like: | @Stateless | @Name("shopActi

[JBoss-user] [JBoss Seam] - Re: Inject object that is outjected from a stateless ejb.

2006-05-25 Thread liudan2005
Thanks Gavin. It works only if I put @Begin annotation in my stateless bean's method. I wonder what gets instantiated when stateless bean 's @Begin method is invoked? Does it actually start a conversation? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=394667

[JBoss-user] [JBoss Seam] - unable to get FacesContext when session starts with CR3

2006-05-26 Thread liudan2005
It worked before until I updated to seam 1.0 cr3 and jboss 4.0.4ga. I have a session scoped component annotated with @Startup. in my @Create method, I try to retrieve FacesContext in order to get HTTP request. But I get null value. This worked before i've upgraed to CR3. View the original pos

[JBoss-user] [JBoss Seam] - Re: unable to get FacesContext when session starts with CR3

2006-05-26 Thread liudan2005
yes, I've also upgraded myfaces as well. What I need is to check user's cookies when session is created. that's why I need to get http request object. Is there any other way to do this, or anyway to get around? In previous version(before I upgrade), this worked in IE but not firefox. Now it st

[JBoss-user] [JBoss Seam] - using t:document in Seam

2006-06-05 Thread liudan2005
I've been looking at http://wiki.apache.org/myfaces/Performance, which requires me to use t:document. when I try to replace html,head with t:document t:documentHead, I keep getting document.Document is not same as ... error. Has anyone tried it yet? View the original post : http://www.jboss.c

[JBoss-user] [EJB 3.0] - Hsql to compare date only?

2006-06-06 Thread liudan2005
I've tried: em.createQuery("from A a where a.birthday=:date").setParameter("date",new Date(),Temporal.DATE); But it doesn't work. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949394#3949394 Reply to the post : http://www.jboss.com/index.html?module=bb&o

[JBoss-user] [EJB 3.0] - Re: Hsql to compare date only?

2006-06-07 Thread liudan2005
anyone knows? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949560#3949560 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949560 ___ JBoss-user mailing list JBoss-user@list

[JBoss-user] [EJB 3.0] - Does Ejb3/Hql support date comparison?

2006-06-07 Thread liudan2005
Compare date only, but not time. I've tried | Date date=new Date(); | em.createQuery("from Person p where p.registeredDate=:date").setParameter("date",date,TemporalType.DATE); | But this doesn't work. I've tried so many ways but still can't get it work. Does Ejb3 support date(but not ti

[JBoss-user] [EJB 3.0] - TemporalType, both DATE and TIME?

2006-06-07 Thread liudan2005
for @Temporal, you can have either Date, or Time, is it possible to have both e.g. DATETIME? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949675#3949675 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949675 ___

[JBoss-user] [JBoss Seam] - _id0 is duplicated exception when stateful bean doesn't have

2006-03-20 Thread liudan2005
I keep getting "_id0 is duplicated in the faces ". At first, I though it's cause by compatibility of facetlets and myfaces. After a lot of times trying, I notices it's cause by that my statful bean not having a @Begin method. This doesn't make any sense to me. Can someone explain it? View the o

[JBoss-user] [JBoss Seam] - f:convertNumber doesn't work with h:selectOneMenu

2006-03-22 Thread liudan2005
Here is my jsf code: | | | | | carBean.carList is a type of List and the selectItems have int values. The page is displayed correctly but when I made a choice and click on submit. nothing happens. Chaning values to String type would solve the problem. It seems f:convertNumb

[JBoss-user] [JBoss Seam] - Re: f:convertNumber doesn't work with h:selectOneMenu

2006-03-22 Thread liudan2005
anyone knows? converting everything to String is really irratating. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932003#3932003 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932003 -

[JBoss-user] [JBoss Seam] - jBPM and the back button

2006-03-27 Thread liudan2005
I'm considering using jBPM with Seam as we've got a lot of pageflows and processes to deal with. Had a look at Seam doc and noticed back button won't be supported if jbpm is used. Is it gonna be easy to enable back button with jbpm? If this is gonna take a lot of effort to implement, I'd rather

[JBoss-user] [JBoss Seam] - Re: jBPM and the back button

2006-03-27 Thread liudan2005
I'm still not quite sure how to do it cause I'm not familiar with jBPM yet. It would be great if you can add the sample code to dvd example. From what you've described, we're now gonna adopt jBPM for our project. Thanks for your help. View the original post : http://www.jboss.com/index.html?mod

[JBoss-user] [JBoss Seam] - Error message need to be improved

2006-03-29 Thread liudan2005
Here are some points I think seamtest need to be improved: 1. Error message/report need to be improved. 2. Configuration need to simplified. 3. Need to more fault tolerant. Here is what happend to us when using SeamTest: We copied everything from seam booking example to our project and added in

[JBoss-user] [JBoss Seam] - How to get EntityManager in seamtest

2006-03-29 Thread liudan2005
Started trying seamtest again. How can i get EntityManager in SeamTest case. tried: EntityManagerFactory emf = Persistence.createEntityManagerFactory("mydb"); and tried: EntityManagerFactory emf = Persistence.createEntityManagerFactory("mydb",configOverrides); None of them worked.

[JBoss-user] [JBoss Seam] - Re: How to get EntityManager in seamtest

2006-03-30 Thread liudan2005
A lot of my entities has got listeners with business logic in. For example, in @PostPersist method I might caculate the balance for the entities. That's why I need em to test entities. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933636#3933636 Reply to th

[JBoss-user] [JBoss Seam] - how to use a different persistence-unit for testing?

2006-03-30 Thread liudan2005
When my ear is deployed to jboss app server, it uses mysql database. When running SeamTest, I want to use HSql. Is it possible to do this? Looking at seam booking example, it bind 2 datasources when runing embeded container but it only uses bookingDatasource: Bound datasource to JNDI name 'java:

[JBoss-user] [EJB 3.0] - Inheritance TABLE_PER_CLASS not supported?

2006-03-30 Thread liudan2005
I have following 3 entities: | | @Entity | @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) | public class Pet implements Serializable | { | | private Long id; | | @Id @GeneratedValue | public Long getId() | { | return id; | }

[JBoss-user] [EJB 3.0] - Re: Inheritance TABLE_PER_CLASS not supported?

2006-03-30 Thread liudan2005
Thanks. using TABLE solved my problem. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933804#3933804 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3933804 --- This S

[JBoss-user] [JBoss Seam] - Re: How to get EntityManager in seamtest

2006-04-03 Thread liudan2005
Has anyone tried? I now have to put all my test code into a ejb, which is not right. How do you usually test your entities with callback listeners? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934438#3934438 Reply to the post : http://www.jboss.com/index

[JBoss-user] [JBoss Seam] - Re: How to get EntityManager in seamtest

2006-04-04 Thread liudan2005
OK. If I have code like this: | @Entity | public class Hotel implements Serializable | { | ... | @PrePersist | public void initialiseRank(){ | int rank= caculate(a+b+c); | setRank(rank); | } | | @PreUpdate | public void generateHistoryRecord(){ | save(getOriginalReco

[JBoss-user] [JBoss Seam] - Re: How to get EntityManager in seamtest

2006-04-04 Thread liudan2005
This scenario for me is more like an entity level integration test because a test case involved a set of entities e.g. Hotel + Feedback + History... >From what you said, SeamTest is not suitable for entity-only level tests. What >would you recommand for our scenario? We basically need a way to

[JBoss-user] [JBoss Seam] - Re: How to get EntityManager in seamtest

2006-04-04 Thread liudan2005
It would be convienent if seam provides something like EntityTest. Had a look at http://blog.hibernate.org/cgi-bin/blosxom.cgi/2005/11/24#ejb3withtestng. To test entites is not easy as what I thought. I have to get those xmls and re-config them, write code for starting up embeded container, use

[JBoss-user] [JBoss Seam] - Re: How to get EntityManager in seamtest

2006-04-04 Thread liudan2005
Thanks Gavin. Managed to get it working by doing this: | Map configOverrides = new HashMap(); | configOverrides.put("hibernate.connection.driver_class", "org.hsqldb.jdbcDriver"); | configOverrides.put("hibernate.connection.url", "jdbc:hsqldb:."); | ... |

[JBoss-user] [JBoss Seam] - locale is not supported?

2006-04-07 Thread liudan2005
I don't know whether this is a myfaces or facelets problem. Since I can't find a solution anywher, I have to try to post it here. I have this in my faces-config.xml: | | resources.application | | en_GB | en_US | | | and my jsf code is

[JBoss-user] [JBoss Seam] - Re: locale is not supported?

2006-04-07 Thread liudan2005
Thanks for your help. Using localeSelect solved my problem. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935832#3935832 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935832 -

[JBoss-user] [JBoss Seam] - Re: Using seam with myfaces ajax components.

2006-04-07 Thread liudan2005
I've got the same problem when using tomahawk inputSuggestAjax. I have this in my jsf page: | | But I got this error: | xxx.InputSuggestAjaxBean$$EnhancerByCGLIB$$268b7473, property: getItems | getItems is a method name, but it seems the render treats it as a property. Any idea? V

[JBoss-user] [JBoss Seam] - synchronization question for application scoped seam compone

2006-04-24 Thread liudan2005
I have an application scoped seam component which complys standard bean pattern. I periodically update this object by using its setters. Since this object is accessed from many threads in the servlet container, do I need to make its setters synchronized in my multi-cpu environment? Does Seam man

[JBoss-user] [JBoss Seam] - Session scoped listener works in Firefox but not in IE

2006-04-25 Thread liudan2005
I have a session scoped component with @Startup annotation to listen to the session event. When use firefox, everything works fine. but when use IE to browse my page, it prints thousands message on jboss console (there's a dead loop). Here is my code. | @Name("mySessionListener") | @Scope(

[JBoss-user] [JBoss Seam] - Re: synchronization question for application scoped seam com

2006-04-25 Thread liudan2005
anyone knows? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939253#3939253 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939253 --- Using Tomcat but need to do mor

[JBoss-user] [JBoss Seam] - Re: synchronization question for application scoped seam com

2006-04-25 Thread liudan2005
yes, it is a javabean. So I'll make its setters synchronized then. Thanks Gavin. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939308#3939308 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939308 ---

[JBoss-user] [JBoss Seam] - Entity test stopped working when update to rc2.

2006-04-26 Thread liudan2005
It worked fine with seam beta 2. Here is the error: ERROR 26-04 23:54:30,359 (NamingHelper.java:getInitialContext:33) -Could not obtain initial context javax.naming.NamingException: Local server is not initialized at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnly

[JBoss-user] [JBoss Seam] - Re: Entity test stopped working when update to rc2.

2006-04-27 Thread liudan2005
Local Server is not initialized. | Caused by: javax.naming.NamingException: Local server is not initialized | at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45) | at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:66

[JBoss-user] [JBoss Seam] - RC2 doesn't support comment in jsf page

2006-04-27 Thread liudan2005
this might be caused by upgraded facelet bundled with Seam. I can't have any comment in my jsf page, the page handler simply ignores those tags. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939854#3939854 Reply to the post : http://www.jboss.com/index.htm

[JBoss-user] [JBoss Seam] - Re: Session scoped listener works in Firefox but not in IE

2006-04-27 Thread liudan2005
This problem is still there in RC2. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939855#3939855 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939855 --- Using Tom

[JBoss-user] [JBoss Seam] - method defined in pages.xml can't start a converstaion

2006-06-12 Thread liudan2005
I have a conversational stateful bean that has a start() method annotated with @Begin(join=true). However, when this method is triggered from a page that's define in pages.xml, the converstation doesn't get started. | #{booking.start} | Is this a bug, or a limitation in Seam? View the or

[JBoss-user] [JBoss Seam] - Re: method defined in pages.xml can't start a converstaion

2006-06-13 Thread liudan2005
how do I define a conversation name in this case? I thought converstations are identified by IDs but not names. So I don't know what name I should specify here. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950659#3950659 Reply to the post : http://www.

[JBoss-user] [JBoss Seam] - Re: method defined in pages.xml can't start a converstaion

2006-06-13 Thread liudan2005
I've tried it but it doesn't work. Here is what I get in console when trying to any method of booking class after page is displayed: no long-running conversation for @Conversational bean: booking View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950682#3950682 R

[JBoss-user] [JBoss Seam] - Re: method defined in pages.xml can't start a converstaion

2006-06-13 Thread liudan2005
Removing "join=true" doesn't help. I still get the same error. Here is my bean: | @Stateful | @Name("booking") | @Scope(CONVERSATION) | @Interceptors(SeamInterceptor.class) | @LoggedIn | @Conversational(ifNotBegunOutcome = "home") | public class BookingActionimplements Booking, Seria

[JBoss-user] [JBoss Seam] - Re: HELP: do you have to publish every changes you made manu

2006-06-14 Thread liudan2005
I don't quite get it. since ears are extracted to something like tmp/deploy/tmp62396jboss-seam-booking.ear-contents. Each time you deploy your ear, the folder would be differerent. how do u write a ant task for doing this? View the original post : http://www.jboss.com/index.html?module=bb&op=vi

[JBoss-user] [JBoss Seam] - Re: HELP: do you have to publish every changes you made manu

2006-06-14 Thread liudan2005
Thanks. finally got it working for my xhtml pages. What about ejb code? is there anyway to modify a single class at runtime? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950852#3950852 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posti

[JBoss-user] [JBoss Seam] - Re: HELP: do you have to publish every changes you made manu

2006-06-14 Thread liudan2005
I've tried but it seems not work for me. I have enabled this in run.bat set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS% what else do i need to do? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950887#3950887 R

[JBoss-user] [JBoss Seam] - Re: HELP: do you have to publish every changes you made manu

2006-06-14 Thread liudan2005
yes, i can connect it from eclipse and I have breakpoint set up with no problem. When I look at folder deploy\jboss-seam-booking.ear\jboss-seam-booking.jar\org\..., I can see the class file is the latest one. but for something, jboss ignores my chages unless I redeploy the whole ear. I haven't

[JBoss-user] [JBoss Seam] - Re: method defined in pages.xml can't start a converstaion

2006-06-15 Thread liudan2005
I've simplified my code and tried everything i can but still no luck. Here is my code list in full MyStuffAction.java | @Stateful | @Name("myStuff") | @Scope(CONVERSATION) | public class MyStuffAction implements MyStuff | { | | @In(required=false,scope=ScopeType.CONVERSATION)

[JBoss-user] [JBoss Seam] - SeamTest fails

2006-06-15 Thread liudan2005
We are thinking of start using SeamTest again since seam going to GA. However, we can't get it working and there's no way to find out what causes the problem. Here is the exception. FAILED: end java.lang.NullPointerException at org.jboss.seam.mock.SeamTest.end(SeamTest.java:297)

[JBoss-user] [JBoss Seam] - Re: SeamTest fails

2006-06-16 Thread liudan2005
I've just noticed one of our methods named init() and SeamTest has got the seam method name. changing the method name solve the problem. The NullPointerException and "comp not bound" stopped us using seamtest for a couple of months now. As it works now, guess we can start using seamtest again.

[JBoss-user] [EJB 3.0] - bug: Compare date only for a TIMESTAMP field?

2006-06-19 Thread liudan2005
I have a date field defined as Temporal.TIMESTAMP. There seem to be a problem If I want to compare its date without check time. Here is my hql: em.createQuery("from A a where a.datetime=:date").setParameter("date",new Date(),Temporal.DATE); This fails unless I define my date filed as Temporal.D

[JBoss-user] [JBoss Seam] - ejb3 question, Compare date only for a TIMESTAMP field?

2006-06-20 Thread liudan2005
I know it's a wrong place to post it here but still worth a try since i can't get answer from ejb3 forum. I have a date field defined as Temporal.TIMESTAMP. There seem to be a problem If I want to compare its date without check time. Here is my hql: em.createQuery("from A a where a.datetime=:dat

[JBoss-user] [JBoss Seam] - Re: ejb3 question, Compare date only for a TIMESTAMP field?

2006-06-20 Thread liudan2005
Thanks Gavin. Problem solved. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952138#3952138 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3952138 ___ JBoss-user mailing list

[JBoss-user] [JBoss Seam] - Re: Help understanding Entity component lifecycle

2006-06-21 Thread liudan2005
I've had similar problem and this is how I solved my problem. Don't know if it helps to solve your problem. Basically I created another wrapper object UserService for User. When currentUser is requested, I manually check the sesssion and decides what to return. Here is some my code. UserServi

[JBoss-user] [JBoss Seam] - Re: Seam Booking example does not sorport chinese character

2006-06-22 Thread liudan2005
this has got nothing to do with Seam. a common way to solve this problem is to write a filter like this: | public class SetCharacterEncodingFilter implements Filter { |public void doFilter(ServletRequest request, ServletResponse response, |FilterChain chain) thr

[JBoss-user] [JBoss Seam] - specify a face message for @Conversational ifNotBegunOutcome

2006-06-22 Thread liudan2005
I have defined @Conversational(ifNotBegunOutcome = Home), so when a method is invoked and the converstion is started, the user would be directed to the home page. The face message is "No conversation" by default, is there any place I can specify the message in this case? View the original post

[JBoss-user] [JBoss Seam] - Re: specify a face message for @Conversational ifNotBegunOut

2006-06-22 Thread liudan2005
Great! It works now. Thanks Gavin. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952826#3952826 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3952826 Using Tomcat but need to do more? Need to support web services, sec

[JBoss-user] [JBoss Seam] - Return to the page where I came from?

2006-06-24 Thread liudan2005
I have 2 pages: item_list.xhtml and item_detail.xhtml. User can modify the item detail when clicked a link in item_list page. In item_detail page, user modifies the item details and submit the changes by triggering myItemAction.submitChange(). Once the changes have been made, the user will be d

[JBoss-user] [JBoss Seam] - Re: Return to the page where I came from?

2006-06-25 Thread liudan2005
Great stuff. Thanks Gavin. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953266#3953266 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953266 Using Tomcat but need to do more? Need to support web services, security? G

[JBoss-user] [JBoss Seam] - the bundled hibernate doesn't work @oneToOne shared primary

2006-07-07 Thread liudan2005
Here is my code: | Owner{ | @Id | public Long getId() { return id; } | | @OneToOne(fetch=FetchType.LAZY, cascade=CascadeType.ALL) | @PrimaryKeyJoinColumn | public Employment getEmployment() { return employment; } | } | | Employment { | @Id | @

[JBoss-user] [JBoss Seam] - Re: the bundled hibernate doesn't work @oneToOne shared prim

2006-07-08 Thread liudan2005
The trouble I've been asking many questions in Ejb3 forum but never got any reply. That's why I am trying my luck here. Thanks. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956340#3956340 Reply to the post : http://www.jboss.com/index.html?module=bb&op=po

[JBoss-user] [JBoss Seam] - Re: the bundled hibernate doesn't work @oneToOne shared prim

2006-07-08 Thread liudan2005
Here is the code I've tried which doesn't work: | @Entity | Owner{ | private Long id; | private Employment employment; | @Id | public Long getId() { | return id; | } | | public Long setId(Long id) { | this.id=id; | } | | @OneToOne(fet

[JBoss-user] [JBoss Seam] - Re: the bundled hibernate doesn't work @oneToOne shared prim

2006-07-08 Thread liudan2005
I've looked into them, but non of them actually generates Id automatically. I have to persist one entity first and then retrive the Id from first saved entity and pass it to second entity manually. I guess this is a limitation in Hibernate that you can't use generated Ids when shared primary ke

[JBoss-user] [JBoss Seam] - question about application scope component?

2006-02-01 Thread liudan2005
I have an entity bean which maps to a database table. I need to retrive some data from database through this entity bean when applicaiton starts up so all other back beans and ejbs can access it. I am thinking of making an application scoped object, which retrives data when applicaton starts up.

[JBoss-user] [EJB 3.0] - how to map entity to multiple tables with same structure

2006-02-01 Thread liudan2005
For performance reasons, I have 100 tables with same structures. They are fo r example: t_london, t_france, t_liverpool If I wanna map them to entity beans. I need to have for example: London.class, France.class, Liverpool.class. Is there any way to map one class to 100 tables. For example,

[JBoss-user] [JBoss Seam] - Re: question about application scope component?

2006-02-01 Thread liudan2005
Thanks for your help Gavin. I followed you and made a seam component(not a stateful or stateless bean) with following annotations: @Name("globalparams") @Scope(ScopeType.APPLICATION) @Startup @Interceptors(SeamInterceptor.class) this works fine but I can't inject @PersistenceContext EntityManager

[JBoss-user] [JBoss Seam] - Re: question about application scope component?

2006-02-01 Thread liudan2005
Problem solved by use: InitialContext ctx = new InitialContext(); ctx.lookup("app/beanname/local"); Thanks. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921079#3921079 Reply to the post : http://www.jboss.com/index.html?module=bb&o

[JBoss-user] [EJB 3.0] - Re: how to map entity to multiple tables with same structure

2006-02-02 Thread liudan2005
I am thinking of using table partition to split the large table so that i don't have to split tables. Havn't got an environment to test yet. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921148#3921148 Reply to the post : http://www.jboss.com/index.html?mod

[JBoss-user] [EJB 3.0] - Is it possible to map an entity bean to a database view?

2006-02-02 Thread liudan2005
Is it possible to map an entity bean to a database view? anyone knows? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921147#3921147 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921147 --

[JBoss-user] [EJB 3.0] - Re: Is it possible to map an entity bean to a database view?

2006-02-02 Thread liudan2005
thanks. it works View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921317#3921317 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921317 --- This SF.net email is sponsor

[JBoss-user] [EJB 3.0] - Is there any easy way to a create primary key for combined f

2006-02-02 Thread liudan2005
When I have a unique proerty for my entity, I can simply use @Id to specify it as the primary key. If I want to have a combine primary key(e.g. lastname, firstname), what's the simplest way to do make the primary key. I did a search on google and it seems I have to create another class in order

[JBoss-user] [EJB 3.0] - Re: Is there any easy way to a create primary key for combin

2006-02-02 Thread liudan2005
I get following error: org.hibernate.PropertyNotFoundException: Could not find a setter for property bytes in class java.lang.String here is what my code looks like: @EmbeddedId public String getFirstname() { return firstname; } public void setFir

[JBoss-user] [EJB 3.0] - Query against @CollectionOfElements

2006-02-02 Thread liudan2005
I have an entity: class MyClass{ ... @CollectionOfElements public Set getNumbers() { return numbers; } } now I wanna query from this field: "select m from MyClass as m where m.numbers = '07887234234' " but it gives me an error. is there any way to query it

[JBoss-user] [JBoss Seam] - Is seam compatible with Oracle ADF?

2006-02-02 Thread liudan2005
Had a paly with ADF and I think it's really cool. lots of ready-to-use stuffs. I wonder if it's possible to use ADF with Seam. It would be great if someone can make an example of it. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921332#3921332 Reply to the

[JBoss-user] [EJB 3.0] - EJBQL and Native SQL combination, is it possible?

2006-02-03 Thread liudan2005
As EJBQL doesn't support full text search, I have to write a native sql such as: Select * from articles where id in (Select id From articles_fulltext WHERE MATCH (title,body) AGAINST ('keywords') ). This might look easy to write. Howevery, if the articles table has 10 join tables. This native sq

[JBoss-user] [EJB 3.0] - Re: Query against @CollectionOfElements

2006-02-05 Thread liudan2005
does anyone know? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921739#3921739 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921739 --- This SF.net email is sponso

[JBoss-user] [JBoss Seam] - Re: Is seam compatible with Oracle ADF?

2006-02-06 Thread liudan2005
Great! Thanks Denniss. I am gonna try it today. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921824#3921824 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921824 -

[JBoss-user] [EJB 3.0] - Re: Query against @CollectionOfElements

2006-02-06 Thread liudan2005
Great! It works. Thanks Chris. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921841#3921841 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921841 --- This SF.net em

[JBoss-user] [JBoss Seam] - How to get default Locale in @Startup class?

2006-02-07 Thread liudan2005
In the @Create method of my @Startup class, I need to pull some messages from my message bundle. The normal way is to use facescontext like this: FacesContext facesContext = FacesContext.getCurrentInstance(); facesContext.getApplication().getMessageBundle(); In a @Startup class, the fac

[JBoss-user] [JBoss Seam] - Re: How to get default Locale in @Startup class?

2006-02-07 Thread liudan2005
The application initialization process takes quite a while. For our demo project, it would take a long time to process the first operation if we don't put those code in @Startup class. This is generally acceptable but not very nice in some situations(hard to explain here). Anyway, it's not gonn

[JBoss-user] [JBoss Seam] - Re: How to get default Locale in @Startup class?

2006-02-08 Thread liudan2005
Thanks Gavin. I guess I'll do it the old fashioned way then. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922288#3922288 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922288

[JBoss-user] [JBoss Seam] - Bookmakring jsf pages in seam?

2006-02-10 Thread liudan2005
I am trying to make my jsf pages search engine friendly I've had a search in google and have got some basic ideas but don't know how to make this working. In booking example, main.xhtml, if I put: and in java I may add: String id = facesContext.getExternalContext().getRequestParameterMap().g

[JBoss-user] [JBoss Seam] - Re: Bookmakring jsf pages in seam?

2006-02-10 Thread liudan2005
Thanks Gavin. I've just noticed beta2 is out. Here is what I've tried. I've modified HotelBookingAction so it doesn't require login. Here is its class annotations: @Stateful @Name("hotelBooking") @Scope(SESSION) @Interceptors(SeamInterceptor.class) I then added a method: @Factory("hotels") pub

[JBoss-user] [JBoss Seam] - Re: Bookmakring jsf pages in seam?

2006-02-10 Thread liudan2005
I've changed it to hotel, here is what I've got now: javax.el.ELException: /hotel.xhtml: create method not found at com.sun.facelets.compiler.UIText.encodeBegin(UIText.java:51) at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:511) at com.sun.

[JBoss-user] [JBoss Seam] - Re: Bookmakring jsf pages in seam?

2006-02-10 Thread liudan2005
What a stupid mistake I've made. Thanks Gavin. It works now. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923012#3923012 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3923012

[JBoss-user] [JBoss Seam] - SeamTest Performance, is there a way to speed up?

2006-02-14 Thread liudan2005
quite often, I change my code a little bit and I run the test to see the result. At moment, all my test extend SeamTest since it builds a nice test enrionment for me automatically. Now with more and more code added, it takes a long time to run my test. It sometimes take more than 30 seconds to s

[JBoss-user] [JBoss Seam] - Re: SeamTest Performance, is there a way to speed up?

2006-02-14 Thread liudan2005
Yes, the container startup and initialising the database maping stuffs take a lot of time. Also, If I debug my code, it would be 2-3 times slower. Normally, it takes about 10 - 15 seconds to run my simple test with simple code like em.persist(new MyEntityBean()). If I choose to debug my code, it

[JBoss-user] [JBoss Seam] - Re: SeamTest Performance, is there a way to speed up?

2006-02-14 Thread liudan2005
I looked the detail of the timer and I can see that Hibernate takes 70% of startup time. My hibernate.cglib.use_reflection_optimizer is set to false by default. Also I've noticed if I reboot my computer and run the test, it would take about 8 seconds. But if I run it again and again, it will be

[JBoss-user] [JBoss Seam] - Re: SeamTest Performance, is there a way to speed up?

2006-02-14 Thread liudan2005
Also I've noticed it hangs in here for quite a while: WARN 14-02 17:51:40,453 (BeanSchemaBinding.java:init:227) -You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0' View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=392

[JBoss-user] [JBoss Seam] - Re: SeamTest Performance, is there a way to speed up?

2006-02-15 Thread liudan2005
I've just noticed it's also very slow in booking example when debug is turned on. Here is the result when I run LoginTest: INFO 15-02 10:31:26,235 (Initialization.java:init:90) -initializing Seam ... INFO 15-02 10:31:27,735 (Ejb.java:startup:40) -starting the embedded EJB container INFO 15-0

[JBoss-user] [JBoss Seam] - Re: SeamTest Performance, is there a way to speed up?

2006-02-15 Thread liudan2005
As u can see I am now running booking example which takes 28 seconds to initialise when debug is turned on. I don't understand why this happens. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923920#3923920 Reply to the post : http://www.jboss.com/index.html

[JBoss-user] [JBoss Seam] - Re: SeamTest Performance, is there a way to speed up?

2006-02-15 Thread liudan2005
The booking example has got 3 entities: Booking Hotel User View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923961#3923961 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3923961 --

  1   2   >