Java Doc for HAServiceMBeanSupport.java in  » EJB-Server-JBoss-4.2.1 » cluster » org » jboss » ha » jmx » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » cluster » org.jboss.ha.jmx 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jboss.ha.jmx.HAServiceMBeanSupport

All known Subclasses:   org.jboss.ha.jmx.examples.HANotificationBroadcasterExample,  org.jboss.ha.singleton.HASingletonSupport,
HAServiceMBeanSupport
public class HAServiceMBeanSupport extends ServiceMBeanSupport implements HAServiceMBean(Code)
Management Bean for an HA-Service. Provides a convenient common base for cluster symmetric MBeans. This class is also a user transparent extension of the standard NotificationBroadcasterSupport to a clustered environment. Listeners register with their local broadcaster. Invoking sendNotification() on any broadcaster, will notify all listeners in the same cluster partition. TODO: The performance can be further optimized by avoiding broadcast messages when remote listener nodes are not interested (e.g. have no local subscribers) or by iterating locally over filters or remote listeners.
author:
   Ivelin Ivanov *
version:
   $Revision: 57188 $



Constructor Summary
public  HAServiceMBeanSupport()
    

Method Summary
public  void_receiveRemoteNotification(Notification notification)
     Invoked by remote broadcasters.
protected  voidcallAsyncMethodOnPartition(String methodName, Object[] args, Class[] types)
    
public  voidcallMethodOnPartition(String methodName, Object[] args)
    
public  voidcallMethodOnPartition(String methodName, Object[] args, Class[] types)
    
protected  HAPartitionfindHAPartitionWithName(String name)
    
public  ClusterPartitionMBeangetClusterPartition()
    
public  SerializablegetDistributedState(String key)
     Convenience method for sharing state across a cluster partition.
public  HAPartitiongetPartition()
    
public  StringgetPartitionName()
    
public  booleangetSendLocalLifecycleNotifications()
     Gets whether JMX Notifications should be sent to local (same JVM) listeners if the notification is for an attribute change to attribute "State".
public  booleangetSendRemoteLifecycleNotifications()
     Gets whether JMX Notifications should be sent to remote listeners if the notification is for an attribute change to attribute "State".
public  StringgetServiceHAName()
     Override this method only if you need to provide a custom partition wide unique service name.
protected  booleanisDRMMasterReplica()
    
public  voidpartitionTopologyChanged(List newReplicants, int newReplicantsViewId)
    
protected  voidregisterDRMListener()
    
protected  voidregisterRPCHandler()
    
public  voidsendNotification(Notification notification)
     Broadcast the notification to the remote listener nodes (if any) and then invoke super.sendNotification() to notify local listeners.
Parameters:
  notification - sent out to local listeners and other nodes.
protected  voidsendNotificationRemote(Notification notification)
    
protected  voidsendNotificationToLocalListeners(Notification notification)
    
public  voidsetClusterPartition(ClusterPartitionMBean clusterPartition)
    
public  voidsetDistributedState(String key, Serializable value)
     Convenience method for sharing state across a cluster partition.
public  voidsetPartitionName(String newPartitionName)
    
public  voidsetSendLocalLifecycleNotifications(boolean sendLocalLifecycleNotifications)
     Sets whether JMX Notifications should be sent to local (same JVM) listeners if the notification is for an attribute change to attribute "State".
public  voidsetSendRemoteLifecycleNotifications(boolean sendRemoteLifecycleNotifications)
     Sets whether JMX Notifications should be sent to remote listeners if the notification is for an attribute change to attribute "State".
protected  voidsetupPartition()
    
protected  voidstartService()
    

Implementors of this method should not code the singleton logic here.

protected  voidstopService()
    
protected  voidunregisterDRMListener()
    
protected  voidunregisterRPCHandler()
    


Constructor Detail
HAServiceMBeanSupport
public HAServiceMBeanSupport()(Code)




Method Detail
_receiveRemoteNotification
public void _receiveRemoteNotification(Notification notification)(Code)
Invoked by remote broadcasters. Delegates to the super class



callAsyncMethodOnPartition
protected void callAsyncMethodOnPartition(String methodName, Object[] args, Class[] types) throws Exception(Code)



callMethodOnPartition
public void callMethodOnPartition(String methodName, Object[] args) throws Exception(Code)

Parameters:
  methodName -
Parameters:
  args -
throws:
  Exception - HAServiceMBeanSupport.callMethodOnPartition(String,Object[],Class[])



callMethodOnPartition
public void callMethodOnPartition(String methodName, Object[] args, Class[] types) throws Exception(Code)



findHAPartitionWithName
protected HAPartition findHAPartitionWithName(String name) throws Exception(Code)



getClusterPartition
public ClusterPartitionMBean getClusterPartition()(Code)



getDistributedState
public Serializable getDistributedState(String key)(Code)
Convenience method for sharing state across a cluster partition. Delegates to the DistributedStateService
Parameters:
  key - key for the distributed object Serializable the distributed object



getPartition
public HAPartition getPartition()(Code)



getPartitionName
public String getPartitionName()(Code)



getSendLocalLifecycleNotifications
public boolean getSendLocalLifecycleNotifications()(Code)
Gets whether JMX Notifications should be sent to local (same JVM) listeners if the notification is for an attribute change to attribute "State".

Default is true.


See Also:   HAServiceMBeanSupport.sendNotification(Notification)



getSendRemoteLifecycleNotifications
public boolean getSendRemoteLifecycleNotifications()(Code)
Gets whether JMX Notifications should be sent to remote listeners if the notification is for an attribute change to attribute "State".

Default is true.

See http://jira.jboss.com/jira/browse/JBAS-3194 for an example of a use case where this property should be set to false.


See Also:   HAServiceMBeanSupport.sendNotification(Notification)



getServiceHAName
public String getServiceHAName()(Code)
Override this method only if you need to provide a custom partition wide unique service name. The default implementation will usually work, provided that the getServiceName() method returns a unique canonical MBean name. partition wide unique service name



isDRMMasterReplica
protected boolean isDRMMasterReplica()(Code)



partitionTopologyChanged
public void partitionTopologyChanged(List newReplicants, int newReplicantsViewId)(Code)



registerDRMListener
protected void registerDRMListener() throws Exception(Code)



registerRPCHandler
protected void registerRPCHandler()(Code)



sendNotification
public void sendNotification(Notification notification)(Code)
Broadcast the notification to the remote listener nodes (if any) and then invoke super.sendNotification() to notify local listeners.
Parameters:
  notification - sent out to local listeners and other nodes. It should be serializable.It is recommended that the source of the notification is an ObjectName of an MBean that is is available on all nodes where the broadcaster MBean is registered.
See Also:   HAServiceMBeanSupport.getSendLocalLifecycleNotifications()
See Also:   HAServiceMBeanSupport.getSendRemoteLifecycleNotifications()
See Also:   javax.management.NotificationBroadcasterSupport.sendNotification(Notification)



sendNotificationRemote
protected void sendNotificationRemote(Notification notification) throws Exception(Code)
Broadcast a notifcation remotely to the partition participants
Parameters:
  notification -



sendNotificationToLocalListeners
protected void sendNotificationToLocalListeners(Notification notification)(Code)



setClusterPartition
public void setClusterPartition(ClusterPartitionMBean clusterPartition)(Code)



setDistributedState
public void setDistributedState(String key, Serializable value) throws Exception(Code)
Convenience method for sharing state across a cluster partition. Delegates to the DistributedStateService
Parameters:
  key - key for the distributed object
Parameters:
  value - the distributed object



setPartitionName
public void setPartitionName(String newPartitionName)(Code)



setSendLocalLifecycleNotifications
public void setSendLocalLifecycleNotifications(boolean sendLocalLifecycleNotifications)(Code)
Sets whether JMX Notifications should be sent to local (same JVM) listeners if the notification is for an attribute change to attribute "State".

Default is true.


See Also:   HAServiceMBeanSupport.sendNotification(Notification)



setSendRemoteLifecycleNotifications
public void setSendRemoteLifecycleNotifications(boolean sendRemoteLifecycleNotifications)(Code)
Sets whether JMX Notifications should be sent to remote listeners if the notification is for an attribute change to attribute "State".

Default is true.

See http://jira.jboss.com/jira/browse/JBAS-3194 for an example of a use case where this property should be set to false.


See Also:   HAServiceMBeanSupport.sendNotification(Notification)



setupPartition
protected void setupPartition() throws Exception(Code)



startService
protected void startService() throws Exception(Code)

Implementors of this method should not code the singleton logic here. The MBean lifecycle create/start/stop are separate from the singleton logic. Singleton logic should originate in becomeMaster().

Attention: Always call this method when you overwrite it in a subclass because it elects the master singleton node.




stopService
protected void stopService() throws Exception(Code)

Attention: Always call this method when you overwrite it in a subclass




unregisterDRMListener
protected void unregisterDRMListener() throws Exception(Code)



unregisterRPCHandler
protected void unregisterRPCHandler()(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.