[Design of JBossCache] - POJOization of config elements
by bstansberry@jboss.com
Branching off from http://www.jboss.com/index.html?module=bb&op=viewtopic&t=92700 as that thread's a bit wide ranging :)
It's nice if individual BuddyLocator, CacheLoader and EvictionPolicy impls can provide POJO config classes; i.e. classes that expose bean properties, rather than config solely via a Properties object. This should be optional; i.e. an impl must be able to configure itself via Properties, but if it has an impl-specific config class that the MC can use, that's good too.
This leads to some API changes. I'll use BuddyLocator as an example.
First, we add a new BuddyLocatorConfig class.
| public static class BuddyLocatorConfig {
|
| public String getBuddyLocatorClass() {...}
| public void setBuddyLocatorClass(String className) {...}
|
| public Properties getBuddyLocatorProperties() {...}
| public void setBuddyLocatorProperties(Properties properties) {...}
|
| }
|
Specific BuddyLocator impls can have their own type-specific subclass of this with their own java bean properties, but they must be able to configure themselves via the base superclass w/ its Properties as well.
So, BuddyLocator interface becomes:
| public interface BuddyLocator
| {
| public BuddyLocatorConfig getConfig();
| public void init(BuddyLocatorConfig config);
| public List locateBuddies(Map buddyPoolMap, List currentMembership, IpAddress dataOwner);
| }
|
Basically init() takes a BuddyLocatorConfig instead of Properties; plus I added a getter for the config.
Similar concept would apply to CacheLoader and EvictionPolicy. For CacheLoader, the equivalent to BuddyLocatorConfig already exists with IndividualCacheLoaderConfig; it's just not directly injected into a CacheLoader. So for the CacheLoader interface setConfig() would take IndividualCacheLoaderConfig instead of Properties, plus I'd add a getter for the config as well.
Haven't looked int detail at EvictionPolicy, but expect the same concept to apply there.
Comments?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979144#3979144
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979144
19 years, 5 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Client failover redeliveries discussion
by clebert.suconic@jboss.com
"ovidiu.feodorov(a)jboss.com" wrote :
| Clebert wrote :
| | Basically what I do on failover is to create a new consumer on the new server, replace IDs and re-register the Callback handler. The server at this point will think it's a new client coming. In case of durable subscribers/queues and persistent messages you will have the queue refilled
| |
|
| Could you explain in a little bit more detail how this works? You detect the failure at remoting level, and then, what happens? Do you preserve the Connection/Session/Consumer hierarchy on the client? How do you create the corresponding endpoint hierarchy on the fail-over ServerPeer?
|
At this point I'm not detecting the failure at remoting level yet.
There is a method called failover on ClientConnectionDelegate:
class ClientConnectionDelegate:
| public void failOver(ConnectionDelegate newConnection)
|
That method is implemented as an aspect into ConnectionAspect::handleFailover.
handleFailover will navigate over the state hierarchy described at http://wiki.jboss.org/wiki/Wiki.jsp?page=NewMessagingHADesign, and it will create another ServerSide object for each instance found on the hierarchy.
Every time a new serverObject is created, the client object ID is swaped by the new created object, and the remotingConnection instance is swaped by the connection passed as a parameter. This way, all the failed delegates will take place on the new server.
"Ovidiu" wrote : Before having a conference call, I think a better idea is to summarize what you've implemented so far. Describe how the fail-over happens step by step.
I will work with some testcases today, and update the design document. After that we will be ready for a conference about this. This thread has provided the discussion I needed already.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979092#3979092
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979092
19 years, 5 months
[Design of Kosmos] - Basic installation help
by ibrown
Hi,
I'm evaluating using kosmos and cruise control at the moment. I'm new to the world of application and portal servers, so please bear with me if I'm doing something stupid.
To keep the process as simple as possible, I have installed all of the release components out of the box. I am running on WinXP with Java JDK 1.5.0_09
>From jboss I have downloaded the file jboss-portal-2.4.0-bundled.zip and unzipped it into the c:\jboss directory. This zip contains both the server and the portal server.
Next, I have downloaded kosmos-0.2.0RC2-for-jboss-portal.zip and unzipped that to c:\jboss too.
Now, I copy the 3 war directories (kosmos-portlet.war, kosmos-server.war and slide.war) from C:\jboss\kosmos-0.2.0RC2-for-jboss-portal\deploy into C:\jboss\jboss-portal-2.4.0\server\default\deploy
Then (with JDK_HOME set correctly), I open a command prompt, change directory to C:\jboss\jboss-portal-2.4.0\bin and then invoke the run batch file.
After a minute or so, the output tells me that the server is installed and so I open the page http://localhost:8080/portal and sure enough it is there with a kosmos tab. When I go to the kosmos tab, however, not all is well in the world.
Each of the portal windows (if that is the correct terminology) has the heading 'cannot render' and then an Object not found message in the body. Is this to be expected? It looks like something has gone wrong. A quick cut and paste from the internet explorer page gives the following text:
Cannot render
Object not found KosmosDependenciesSfMonitoringPortletInstance
Cannot render
Object not found KosmosToolsSfMonitoringPortletInstance
Cannot render
Object not found JBossProductsSfMonitoringPortletInstance
Cannot render
Object not found JBossSvnMonitoringPortletInstance
Cannot render
Object not found GmfCcMonitoringPortletInstance
Cannot render
Object not found JBossCcMonitoringPortletInstance
Cannot render
Object not found AtlassianJiraMonitoringPortletInstance
Cannot render
Object not found CodehausJiraMonitoringPortletInstance
Cannot render
Object not found JBossJiraMonitoringPortletInstance
Cannot render
Object not found JBossJiraSoapMonitoringPortletInstance
If I navigate to http://localhost:8080/kosmos-server/ then I see a directrory listing, so it would appear that is happy. The same goes for slide.
Can someone point out what I am doing wrong?
Thanks,
Ian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979086#3979086
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979086
19 years, 5 months