|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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 |
public static final String OBJECT_NAME
| Method Detail |
public String beginSession(String sessionId)
sessionId is null
then a session id will be generated.
sessionId - - String a client generated session id. If session id is null
then a session id will be generated and returnedpublic boolean isSessionOpen()
public void commit()
public void rollback()
public void discard()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||