NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Refreshing EJBs in JSF2 Web App

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
smoczyna



Joined: 08 Jan 2009
Posts: 34

PostPosted: Thu Jun 17, 2010 10:12 pm    Post subject: Refreshing EJBs in JSF2 Web App Reply with quote

I have created application by generating entities from MySQL and then JSF pages from them. Everything seems to be fine but when I add new child record (on-to-many relationship) it is not visible immediately and in most cases I have to restart whole app to see the changes. I have tried to force refreshing entity manager but unsuccessfully. If the action itself don't throw an exception (operation on unmanaged bean) it does nothing actually.

How to do successful refresh of the master EJB after newly created child EJB to see the changes?
Back to top
troy giunipero
Posted via mailing list.





PostPosted: Fri Jun 18, 2010 9:44 am    Post subject: Re: Refreshing EJBs in JSF2 Web App Reply with quote

You may want to look at the persistence provider's output in the server log to see when things are happening, not just what happens when an action stops processing.  If you are using Eclipselink, see:

http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging


On 6/18/10 12:12 AM, smoczyna wrote:
Quote:
Quote:
I have created application by generating entities from MySQL and then JSF pages from them. Everything seems to be fine but when I add new child record (on-to-many relationship) it is not visible immediately and in most cases I have to restart whole app to see the changes. I have tried to force refreshing entity manager but unsuccessfully. If the action itself don't throw an exception (operation on unmanaged bean) it does nothing actually.

How to do successful refresh of the master EJB after newly created child EJB to see the changes?




Back to top
smoczyna



Joined: 08 Jan 2009
Posts: 34

PostPosted: Wed Jun 30, 2010 8:07 am    Post subject: Reply with quote

Fine, but what exactly do you suggest to look for? There's nothing suspicious over there.
Back to top
himu123



Joined: 01 Jul 2010
Posts: 1

PostPosted: Thu Jul 01, 2010 9:10 pm    Post subject: Reply with quote

I have created application by generating entities from MySQL and then JSF pages from them. Everything seems to be fine but when I add new child record (on-to-many relationship) it is not visible immediately and in most cases I have to restart whole app to see the changes. I have tried to force refreshing entity manager but unsuccessfully. If the action itself don't throw an exception (operation on unmanaged bean) it does nothing actually.

How to do successful refresh of the master EJB after newly created child EJB to see the changes?


Cheap Hosting
Back to top
smoczyna



Joined: 08 Jan 2009
Posts: 34

PostPosted: Fri Jul 09, 2010 11:12 am    Post subject: Reply with quote

Excuse me himu123, what exactly your response supposed to be? If it is a joke, it is not funny, if it is your response, could you be a little more specific please, you not really helpful like that.

cheers

ps. I have resolved the issue partially. One-to-Many relationship works now, it was the lack of "cascase" option in child entitiy. But I still have this issue with Many-to-Many, 'cascade" option is set in every possible direction but child records still not appear.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo