[Design of POJO Server] - Re: WarDeployer dependency on TomcatClusteringCache
by scott.stark@jboss.org
What I am saying is that these should not be expressed as dependencies on the WarDeployer. They are the defaults for dependencies that one would describe in a jboss-web.xml. To start the war deployer I don't need any of these other services. So this:
| <bean name="WarDeployer" class="org.jboss.web.tomcat.tc6.deployers.TomcatDeployer">
| ...
| <property name="securityManagerService">
| <inject bean="jboss.security:service=JaasSecurityManager" />
| </property>
| <depends>jboss.cache:service=TomcatClusteringCache</depends>
|
| <depends>jboss:service=TransactionManager</depends>
|
| <!-- Only needed if the org.jboss.web.tomcat.tc6.jca.CachedConnectionValve
| TODO: injection
| is enabled in the tomcat server.xml file.
| <depends>jboss.jca:service=CachedConnectionManager</depends>
| -->
| </bean>
|
should be something like:
| <bean name="WarDeployer" class="org.jboss.web.tomcat.tc6.deployers.TomcatDeployer">
| ...
| <property name="defaultSecurityManagerService">jboss.security:service=JaasSecurityManager</property>
| <property name="defaultCacheService">jboss.cache:service=TomcatClusteringCache</property>
| <property name="defaultTM">jboss:service=TransactionManager</property>
|
| </bean>
|
These would then be added to each WebMetaData depends list. We need to update the WebModule mbean to expose accessors for these services so that the dependency can be injected and the WebModule can perform the related configuration. This is the minimal necessary refactoring of the WarDeployer.
The CachedConnectionValve should be the one expression the injection of the CachedConnectionManager. A similar situation exists with the JBossContextConfig in that the authenticators should be declared directly on it rather than propagated from the WarDeployer via jmx. How we work around this in the interim of tomcat supporting injection of pojos is a todo.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982198#3982198
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982198
18 years, 2 months
[Design of POJO Server] - Re: WarDeployer dependency on TomcatClusteringCache
by scott.stark@jboss.org
Ok, I was confused about what I ended up with. The org.jboss.web.tomcat.tc6.deployers.WarDeployer should just be deleted as it was an early local prototype.
org.jboss.web.deployers.AbstractWarDeployer is the base AbstractSimpleRealDeployer that is creating the ServiceMetaData for the web app mbeans in deployWebModule. This is passing on the jboss-web.xml dependencies to the web app ServiceMetaData.
There are a lot of refactoring to be done once tomcat itself is better broken up, but for now the only problem is that the dependencies declared on the WarDeployer should really be propagated down to the web application mbean. So the war-deployer-beans.xml should just have the names of the beans/services that satisfy the tm, clustering, security, etc. needs, and these should just be added to the WebMetaData depends list for processing by the service layer.
How these services are injected/accessed is likely going to need to be pushed down into the web app mbean as well.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982185#3982185
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982185
18 years, 2 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Server side HA and failover
by clebert.suconic@jboss.com
"timfox" wrote : This is a good point, and one that I covered in the design WIKI page: http://wiki.jboss.org/wiki/Wiki.jsp?page=NewHADesignOverview (see the end of the page)
|
| Transferring queues back to a node if it recovers is a very difficult thing to do. Since consumers may be connected to the queues on the new node we can't just move them back to the old node.
|
| Theoretically this is possible by effectively failing them over again to the original node, however in this case any non persistent messages unacked in their sessions will get redelivered so this is not acceptable, if the sessions have any unacked np messages.
|
| This makes the whole thing complex, too complex to do initially. Eventually, if we decide to implement this it could also be used in the general case for the redistribution of connections across the cluster to best utilise available resources. But this is a nice to have and the pain to gain ratio is very high.
I'm concerned on a scenario where a client reconnects back into serverA. A failed consumer will use the nodeID as part of the key of the subscriptionID (by either implementing subscriptionName containing nodeId or by changing PostOffice's signatures the way I have done).
Let me explain of an example:
I - Client connects into serverA
II - Client creates durable subscriber (named subA)
III - serverA fails
IV - ServerB assumes subA
V - Client decided to disconnect from server (session.close())
VI - ServerA comes back.
VII - Client reconnects back (into serverA)
VIII - Clients creates durable subscriber (named subA)... this won't give back the same channelID as nodeB would have the channel now. This could mean loss of messages.
In a parallel scenario...
I - Client connects into serverB
II - Client creates durable subscriber (named subA (same name))
III - It won't use the same channelID as the one created from serverA as the original nodeId is different
So... serverB will have two subscriptions... one from failed nodeA and another from nodeB.
subscriptionA on serverB will be only accessible when serverA fails, and if the client reconnects back to serverA its queue won't be available there.
One thing that I thought to solve this was transfering the queue back on serverA once serverA is back.
If that's not possible maybe we could implement dependency between queues. Say.. the local queue would consume messages from the failed queue (with the same name) case the queue is empty.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982161#3982161
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982161
18 years, 2 months