Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlevs.jmx.standard
Interface ConfigSessionMBean

public interface ConfigSessionMBean

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.

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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD