com.bea.wlevs.management.configuration
Interface ConfigSessionMBean


public interface ConfigSessionMBean
extends ConfigurationMBean

This MBean manages multiple edits within a given session. It also manages multiple sessions from multiple client threads.

An example of using this is given below:


      //get the session MBean

      ConfigSessionMBean session = (ConfigSessionMBean)
                           MBeanServerInvocationHandler.newProxyInstance(  
                               mbsc,
                               ObjectName.getInstance(ConfigSessionMBean.OBJECT_NAME),
                               ConfigSessionMBean.class,
                               false);

        ObjectName eplName =
         ObjectName.getInstance("com.bea.wlevs:application=myapplication,name=processor," +
                                  "type=com.bea.wlevs.configuration.application.DefaultProcessorConfig");


      EPLProcessorMBean eplMBean = (EPLProcessorMBean)
                    MBeanServerInvocationHandler.newProxyInstance(
                           mbsc,
                           ObjectName.getInstance(eplName),
                           EPLProcessorMBean.class,
                           true);

      String sessionid = session.beginSession(null);

      eplMBean.addRule("myruleid","some EPL rule");


      //do some other operations
       .
       .
       .

       //call commit
       session.commit();

  
If the ConfigSessionMBean is not used, then each method invoked will be auto-committed.


Field Summary
static String OBJECT_NAME
           
 
Method Summary
 String beginSession(String sessionId)
          This method will create a session for that thread.
 void commit()
          This method will commit the session.
 void discard()
          This method will discard the session.
 boolean isSessionOpen()
          This method will check if a session is open
 void rollback()
          This method will rollback the session.
 
Methods inherited from interface com.bea.wlevs.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getType, isRegistered
 

Field Detail

OBJECT_NAME

public static final String OBJECT_NAME
Method Detail

beginSession

public String beginSession(String sessionId)
This method will create a session for that thread. If the sessionId is null then a session id will be generated.

Parameters:
sessionId - - String a client generated session id. If session id is null then a session id will be generated and returned
Returns:
- String - a session id

isSessionOpen

public boolean isSessionOpen()
This method will check if a session is open

Returns:
- boolean

commit

public void commit()
This method will commit the session.


rollback

public void rollback()
This method will rollback the session.


discard

public void discard()
This method will discard the session.