FileDocCategorySizeDatePackage
JmsHostEventListener.javaAPI DocGlassfish v2 API5216Fri May 04 22:35:40 BST 2007com.sun.enterprise.server

JmsHostEventListener

public class JmsHostEventListener extends Object implements com.sun.enterprise.admin.event.jms.JmsHostEventListener
Listener class to handle jms-host element events.
author:
Binod

Fields Summary
private ConnectorRegistry
registry
Constructors Summary
Methods Summary
private ActiveJmsResourceAdaptergetAdapter()

        return (ActiveJmsResourceAdapter)
        registry.getActiveResourceAdapter(ConnectorRuntime.DEFAULT_JMS_ADAPTER);
    
private JmsServicegetJmsService(JmsHostEvent event)

        ConfigContext context = event.getConfigContext();
        return ServerBeansFactory.getJmsServiceBean(context);
    
public voidhandleCreate(JmsHostEvent event)
Handles element additions. It is called whenever a JmsHostEvent is received.

param
event Event to be processed.
throws
AdminEventListenerException when the listener is unable to process the event.

         reloadRA(event);
        //getAdapter().addJmsHost(host);
    
public voidhandleDelete(JmsHostEvent event)
Handles jms-host element removal. It is called whenever a JmsHostEvent is received.

param
event Event to be processed.
throws
AdminEventListenerException when the listener is unable to process the event.


                                                                     
       
               
        reloadRA(event);
        //getAdapter().deleteJmsHost(host);
    
public voidhandleUpdate(JmsHostEvent event)
Handles jms-host element modification (attributes/properties values changed). It is called whenever a JmsHostEvent is received.

param
event Event to be processed.
throws
AdminEventListenerException when the listener is unable to process the event.

        reloadRA(event);
        //getAdapter().updateJmsHost(host);
    
private voidreloadRA(JmsHostEvent event)

        try {
            JmsService service = (JmsService) getJmsService(event);
            ActiveJmsResourceAdapter aja = getAdapter();
            if (aja != null) { 
               getAdapter().reloadRA(service);
            }
        } catch (ConnectorRuntimeException cre) {
            AdminEventListenerException ale =
                new AdminEventListenerException(cre.getMessage());
            ale.initCause(cre);
            throw ale;
        } catch (ConfigException ce) {
            AdminEventListenerException ale =
                new AdminEventListenerException(ce.getMessage());
            ale.initCause(ce);
            throw ale;
        }