[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-11-17 Thread [EMAIL PROTECTED]
Pete, I would really suggest using the Hibernate 2nd level cache for caching, it is a simple solution. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4105793#4105793 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105793

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-11-14 Thread pbrewer_uk
I'm a bit puzzled as to why my custom resource loader isn't being called for anything other than page resource bundles. I'm using Seam 2.0.0.GA with Java 6: components.xml | ... | component name=org.jboss.seam.core.resourceLoader | property name=bundleNames |

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-11-14 Thread pbrewer_uk
Ok I've solved that problem. Now I have a problem with seam caching resource bundles. I'm using Java 6 to do my resource bundle caching, so I want to remove, disable or override the following method in org.jboss.seam.core.SeamResourceBundle.java: |private Listjava.util.ResourceBundle

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-28 Thread susnet
It would be nice if someone would like to post a complete example for this including caching. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4099654#4099654 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099654

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-28 Thread [EMAIL PROTECTED]
I blogged about this - see further up the topic. You should cache using the Hibernate 2nd level cache. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4099656#4099656 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099656

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-28 Thread nickarls
Yep. Query hints for enabling a 10 minute cache worked out fine. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4099672#4099672 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4099672

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-10 Thread [EMAIL PROTECTED]
I would use the hibernate query cache - this is exactly the kind of scenario its designed for - and set the query cacheable e.g. for 15 minutes. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4093396#4093396 Reply to the post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-09 Thread nickarls
Sorry, I'm so used to you being clairvoyant ;-) I have a reload method which reloads the cached messages | @Name(org.jboss.seam.core.resourceLoader) | @BypassInterceptors | public class DBMessages extends ResourceLoader { | | @Observer(reload_messages) | private void

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-09 Thread [EMAIL PROTECTED]
Check your startup logs and make sure that your org.jboss.seam.core.resourceLoader component is definitely using DBMessages. Otherwise, try breaking around line 60 of org.jboss.seam.crore.Events and see if you can trace why you get that exception. View the original post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-09 Thread [EMAIL PROTECTED]
Ah, no, its that the method must be public. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4092908#4092908 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092908 ___ jboss-user

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-09 Thread nickarls
Ngh. Of course. Thanks. Did you BTW come to any consensus regarding the caching? For some reason I seem to get different instances of the resource loader (my cache-map is always empty even if the scope is application). Would I have to inject the data from somewhere else? View the original

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-08 Thread nickarls
Any theories/comments? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4092753#4092753 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092753 ___ jboss-user mailing list

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-08 Thread [EMAIL PROTECTED]
Post code - no idea what you are doing. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4092801#4092801 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092801 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-10-03 Thread nickarls
Hi, I've created a light version of the database-resources and put an @Observer(reload_messages) in my class but when I raise the event, seam expects it to be found in the superclass and throws an method not found: reload for component: org.jboss.seam.core.resourceLoader. Do I have to fiddle

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-11 Thread Zerg-Spirit
@Scope(APPLICATION) | @BypassInterceptors | @Name(org.jboss.seam.core.resourceLoader) | public class ExtendedResourceLoader extends | org.jboss.seam.core.ResourceLoader { | | /** | * Method called to load a bundle | * @param bundleName the name of the bundle to

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-10 Thread Zerg-Spirit
Nice article, making things way easier than implementing a lot of class to do the controls. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4082485#4082485 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082485

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-10 Thread amitev
Great job! This should go in the wiki page. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4082512#4082512 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082512 ___ jboss-user

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-10 Thread Zerg-Spirit
Though it's a nice article and helped me simplify the whole stuff, it doesn't really speak about my mine problem: the caching issue. Say, starting with your example, that I want to cache every locale's bundle, and reload them only if they have changed (tagged as 'dirty'). Then, how to 'stay'

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-10 Thread Zerg-Spirit
Ok, the only way I managed to do it yet is to check inside the private ResourceBundle class if the Locale is dirty using a singleton Control class every time the handleGetObject method is called. Seems to work at the moment, but I'm really not sure it's either elegant or the best way to do it.

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-10 Thread [EMAIL PROTECTED]
How are you caching them? I can perhaps extend the tutorial. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4082792#4082792 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082792

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-08 Thread gus888
Great job, Pete. Thank you s much. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4082351#4082351 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082351 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-07 Thread [EMAIL PROTECTED]
This seems like a useful thing to do. I'll try to write up a tutorial based on this thread over the next few days. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4082047#4082047 Reply to the post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-07 Thread Zerg-Spirit
Ok, then I must do something wrong, that's for sure. I have overriden 2 classes: ResourceLoader and MessageFactory ResourceLoader: @Scope(SESSION) | @BypassInterceptors | @Name(org.jboss.seam.core.resourceLoader) | public class ExtendedResourceLoader extends |

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-07 Thread [EMAIL PROTECTED]
No, the resourcebundle should be reloaded due to Messages being reloaded in the current design of this in CVS. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4082025#4082025 Reply to the post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-07 Thread Zerg-Spirit
Yes, I've noticed it and I manage to reload a resource bundle using that, but it doesn't change the actual resourceBundle.instance(), which means if I'm changing my locale again, the resourceBundle will be back to its dirty state. View the original post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-07 Thread [EMAIL PROTECTED]
I wrote this up: [url]http://in.relation.to/Bloggers/StoringYourMessagesInADatabase[url] View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4082284#4082284 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082284

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-06 Thread Zerg-Spirit
Another revival since I still can't find a way to make my 'dirty' thing works. I don't know where to hook to change the code in order to reload the resourceBundle from the database. I tryed some different things using the messageFactory class, but couldn't work out with it. Basically, I'd need

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-09-06 Thread [EMAIL PROTECTED]
Observer org.jboss.seam.localeSelected View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4081734#4081734 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081734 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-08-09 Thread Zerg-Spirit
Hey guys! Sorry about the revival, but with the new ResourceBundle implementation in the last Seam CVS, I'm kinda lost. I modified my implementation trying to get it working, but somehow I never manage to get the 'ResourceBundle.instance()' to change. I can easily load whatever language I

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-08-09 Thread Zerg-Spirit
Actually, I've worked around the problem, since we just need to override ResourceLoader loadBundle method, but now I have a problem about the caching to reload the messages when I set a locale as 'Dirty'. Before the last changes, I was using an implementation or international.Message, but I

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-09 Thread Zerg-Spirit
Thanks for your message, I couldn't retrieve my EntityManager. Finally, I managed to get it working, and I think what I did if pretty much what you did, except I didn't change that much the component processes, such as the caching which I'm using. But your needsReload method seems very useful

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-09 Thread pbrewer_uk
For the needsReload method, I implemented a public boolean isDirty(Date lastLoaded) on the resource bundle entity. It simply compares the lastLoaded date to the last modified date stored on the entity (which is updated each time a message in the bundle is updated). If you do decide to reload

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-08 Thread pbrewer_uk
You can also retrieve the entity manager by calling: | EntityManager em = (EntityManager) Component.getInstance(entityManager, true); | Sorry that this posting is delayed, it sounds like you're pretty much there. But here is a more expanded version of the steps I outlined earlier.

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-04 Thread Zerg-Spirit
Ok thanks. I don't know if I did it the right way though, but it seems to be working, and I tryed to follow peter's steps (page1) as much as possible. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4060246#4060246 Reply to the post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-04 Thread Zerg-Spirit
Just one question though, I'm trying to retrieve the connection String to the Database (aswell as user and password) used by Hibernate (and set in the persistence-xml) dynamically, so that I just have to change it there later on (since I'll use plain java to access my db with my resource

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread Zerg-Spirit
I up the topic cause I still couldn't implements that DataBase Resource Bundle. I now have all the needed classes, following the steps described by pbrewer_uk, but I'm having trouble knowing what code to implements in what class. For example, I don't know what DBControl class is exactly

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread [EMAIL PROTECTED]
Zerg-Spirit wrote : Moreover, I don't know how to set up my Resource Bundle to be used instead of the default one (using Seam 2.0). Give it these annotations: @Scope(ScopeType.SESSION) | @BypassInterceptors | @Name(org.jboss.seam.core.resourceBundle) | public class MyResourceBundle

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread Zerg-Spirit
Thanks, it helped me a lot! Now, I kinda understood how it's working, but my very last problem is pretty tough: I can't retrieve the EntityManager in my Session Bean extending ResourceBundle. @Stateless | @Scope(SESSION) | @Name(dbResourceBundle) | public class DBResourceBundle extends

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread [EMAIL PROTECTED]
1) You will need to use *exactly* the @Name annotation I gave you, otherwise it won't replace Seam's resource bundle. 2) Use an @PostConstruct/@Create method rather than doing it in the constructor - injected resources are never available in the constructor. View the original post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread Zerg-Spirit
The class I pasted isn't the one extending Seam ResourceBundle, but java.util.ResourceBundle. I'll try with a @Create annotation then! Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4059905#4059905 Reply to the post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread Zerg-Spirit
Still can't make it work. I changed my bean so that it's now a SFSB (in order to use @Create): @Stateful | @Name(dbResourceBundle) | @Scope(SESSION) | public class DBResourceBundle extends ResourceBundle implements iDBResourceBundle{ | ... Here's the @Create method: @Create |

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread Zerg-Spirit
Sorry for the triple post, but I just found something strange to me.* I actually managed to call the @Create method by calling the bean on the jsf page (I simply put an outputText with a property of my Bean as value). Since I've done that, the @Create method is now called, apparently the bean is

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread Zerg-Spirit
Ok, sorry again for the multi posts, but I think I finally found out what was wrong. I think I simply can't retrieve my EntityManager by injection at all. Here's what I understood. First, seam load the overrided Seam.ResourceBundle: @Scope(SESSION) | @BypassInterceptors |

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-07-03 Thread [EMAIL PROTECTED]
No. If you do it like that, you won't get managed objects. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4060021#4060021 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060021 ___

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-06-28 Thread Zerg-Spirit
Hi, I'm trying to have my resource bundles stored in a database aswell, and wanted to follow pete's post, but I don't really understand some part of it. What do you mean by: anonymous wrote : 3. Implement a DBContol (to control caching of the resource bundle) What's that? Is it supposed to be

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-05-04 Thread pbrewer_uk
I have implemented a database resource bundle using entities in Seam - its too verbose to post, but here are the steps to implement it: 1. Create the entity beans/ tables. To accurately match the ResourceBundle concept, I created a Resource Bundle table and a child Resource Message table (see

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-05-04 Thread matt.drees
Nifty. I might end up using something like that. Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4043240#4043240 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043240 ___

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-02-14 Thread pbrewer_uk
How would a subclass of org.jboss.seam.core.ResourceBundle be annotated in this case - are the annotations below correct? Also, would some extra configuration in components.xml be required too? ExtendedResourceBundle.java | ... | @Scope(ScopeType.SESSION) | @Intercept(NEVER) |

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-02-14 Thread petemuir
Not quite ExtendedResourceBundle.java | ... | @Name(org.jboss.seam.core.resourceBundle) | public class ExtendedResourceBundle extends org.jboss.seam.core.ResourceBundle | ... | @Override | protected ResourceBundle loadBundle(String bundleName) { | try { |

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-02-14 Thread petemuir
But beware, if you are using core:resourceBundle in components.xml, you'll need to change it to point at your overridden resource bundle View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016327#4016327 Reply to the post :

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-02-14 Thread supernovasoftware.com
I find that my users want to frequently change messages and text throughout my applications. I would prefer to use an entity to store and update messages and text. I believe that I would only need 3 fields: key, text, locale or possibly key, text, en, fr (an extra column of each locale) My

[jboss-user] [JBoss Seam] - Re: ResourceBundle in Database

2007-02-12 Thread [EMAIL PROTECTED]
Easy. Extend the built-in ResourceBundle component, and override some methods. We are targetting JDK5, not JDK6. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4015134#4015134 Reply to the post :