[JBossCache] - Re: POJO Cache as singleton?
by BruceSpringfield
"jacobeukes" wrote : Hi Bruce. Will it be possible to tell me if you've found a solution to your question ?
In my case, there wasn't a need to use a singleton since when the cache is deployed as a service, every time I accessed the cache, I was accessing the Mbean.
"jacobeukes" wrote :
| I am having a problem which seems related to what you are asking. I want to access a JBossCache instance from several places in the same application, but am unable to do so.
|
You might try to deploy it as an Mbean service.
"jacobeukes" wrote :
| I would have thought that JBossCache would have a single instance of the cache and manage it "behind the scenes" .. so that the same cache can be accessed from anywhere in the JVM.
|
That's my experience with it.
"jacobeukes" wrote :
| Am I correct in my assumption that this kind of functionality is not supported and that a developer will have to build it in him/herself by using a singleton or some other related solution ?
|
No.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088866#4088866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088866
18 years, 7 months
[JBoss Seam] - Re: How can I pass parameters to action methods
by cupdike
"christian.bauer(a)jboss.com" wrote : So you need to find another way to pass an "object" from request to request. One way is to pass its identifier and to load it from the database in the second request. Another is to stick it into the session an retrieve it from there by identifier.
But the booking app does pass the object as a parameter [from main.xhtml]:
<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
| ...
| <s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
The only reason I can guess why this works is that the hotels DataModel property is outjected from a session-scoped SFSB. However, I read in one of Dan Allen's articles on IBM that anonymous wrote : Outjected variables are placed directly into the variable context, independent of their backing bean.
So this suggests that it shouldn't matter.
Continuing...
"christian.bauer(a)jboss.com" wrote : And the last and best way is to put it into the conversation context in the first request, name the context variable in the action method as a parameter, and let Seam look it up from the conversation context in the second request. This is really what Seam is about.
Doesn't it depend on what the bounds of the conversation are? According to the Yuan/Heute book, anonymous wrote : The default conversation scope spans only two pages
However, I find this statement a bit misleading. If you read further, it suggests that is really a single request/response cycle. And wouldn't this then explain why trying to pass the object using default conversation scope doesn't work? But then how does it work in the booking app, unless the scope of the component outjecting the property has some influence on the lifecycle of the outjected property.
Clearly I'm missing something I need to know about how all this works. Please someone explain.
TIA, Clark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088861#4088861
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088861
18 years, 7 months