_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q177100 | ComponentRepositoryImpl.getReferringComponents | test | public Set<SleeComponent> getReferringComponents(SleeComponent component) {
Set<SleeComponent> result = new HashSet<SleeComponent>();
for (EventTypeComponent otherComponent : eventTypeComponents.values()) {
if (!otherComponent.getComponentID().equals(
component.getComponentID())) {
if (otherComponent.g... | java | {
"resource": ""
} |
q177101 | SbbEntityFactoryCacheData.getSbbEntities | test | public Set<SbbEntityID> getSbbEntities() {
final Node node = getNode();
if (node == null) {
return Collections.emptySet();
}
HashSet<SbbEntityID> result = new HashSet<SbbEntityID>();
ServiceID serviceID = null;
for (Object obj : node.getChildrenNames()) {
serviceID = (ServiceID) obj;
for (SbbEntity... | java | {
"resource": ""
} |
q177102 | PolicyFileImpl.getPermissions | test | private Permissions getPermissions(Permissions permissions, final CodeSource cs, Principal[] principals) {
List<PolicyHolderEntry> entries = this.currentPolicy.get().policyHolderEntries;
for (PolicyHolderEntry phe : entries) {
// general
selectPermissions(permissions, cs, principals, phe);
// FIXME: ce... | java | {
"resource": ""
} |
q177103 | PolicyFileImpl.getCodeSources | test | public String getCodeSources() {
List<String> css = new ArrayList<String>();
for (PolicyHolderEntry phe : this.currentPolicy.get().policyHolderEntries) {
css.add(phe.getCodeSource().getLocation() == null ? "default" : phe.getCodeSource().getLocation().toString());
}
return Arrays.toString(css.toArray());
... | java | {
"resource": ""
} |
q177104 | ProfileTableImpl.profileExists | test | public boolean profileExists(String profileName) {
boolean result = component.getProfileEntityFramework().findProfile(this.getProfileTableName(), profileName) != null;
if (logger.isDebugEnabled()) {
logger.debug("Profile named "+profileName+(result ? "" : " does not")+" exists on table named " + this.getPr... | java | {
"resource": ""
} |
q177105 | ProfileTableImpl.remove | test | public void remove(boolean isUninstall) throws SLEEException {
if (logger.isTraceEnabled()) {
logger.trace("removeProfileTable: removing profileTable="
+ profileTableName);
}
// remove the table profiles, at this stage they may use notification source, lets leave it.
for (ProfileID profileID : getPr... | java | {
"resource": ""
} |
q177106 | ResourceAdaptorEntityImpl.updateConfigurationProperties | test | public void updateConfigurationProperties(ConfigProperties properties)
throws InvalidConfigurationException, InvalidStateException {
if (!component.getDescriptor().getSupportsActiveReconfiguration()
&& (sleeContainer.getSleeState() != SleeState.STOPPED)
&& (state == ResourceAdaptorEntityState.ACTIVE ||... | java | {
"resource": ""
} |
q177107 | ResourceAdaptorEntityImpl.sleeRunning | test | @SuppressWarnings({ "unchecked", "rawtypes" })
public void sleeRunning() throws InvalidStateException {
// if entity is active then activate the ra object
if (this.state.isActive()) {
if (setFTContext) {
setFTContext = false;
if (object.isFaultTolerant()) {
// set fault tolerant context, i... | java | {
"resource": ""
} |
q177108 | ResourceAdaptorEntityImpl.sleeStopping | test | public void sleeStopping() throws InvalidStateException, TransactionRequiredLocalException {
if (state != null && state.isActive()) {
try {
object.raStopping();
}
catch (Throwable t) {
logger.error("Got exception from RA object",t);
}
scheduleAllActivitiesEnd();
}
} | java | {
"resource": ""
} |
q177109 | ResourceAdaptorEntityImpl.activate | test | @SuppressWarnings({ "unchecked", "rawtypes" })
public void activate() throws InvalidStateException {
if (!this.state.isInactive()) {
throw new InvalidStateException("entity " + name + " is in state: "
+ this.state);
}
this.state = ResourceAdaptorEntityState.ACTIVE;
// if slee is running then act... | java | {
"resource": ""
} |
q177110 | ResourceAdaptorEntityImpl.deactivate | test | public void deactivate() throws InvalidStateException, TransactionRequiredLocalException {
if (!this.state.isActive()) {
throw new InvalidStateException("entity " + name + " is in state: "
+ this.state);
}
this.state = ResourceAdaptorEntityState.STOPPING;
if (object.getState() == ResourceAdaptorOb... | java | {
"resource": ""
} |
q177111 | ResourceAdaptorEntityImpl.scheduleAllActivitiesEnd | test | private void scheduleAllActivitiesEnd() throws TransactionRequiredLocalException {
// schedule the end of all activities if the node is the single member of the cluster
boolean skipActivityEnding = !sleeContainer.getCluster().isSingleMember();
if (!skipActivityEnding && hasActivities()) {
logger.info... | java | {
"resource": ""
} |
q177112 | ResourceAdaptorEntityImpl.remove | test | public void remove() throws InvalidStateException {
if (!this.state.isInactive()) {
throw new InvalidStateException("entity " + name + " is in state: "
+ this.state);
}
object.raUnconfigure();
if (object.isFaultTolerant()) {
object.unsetFaultTolerantResourceAdaptorContext();
ftResourceAda... | java | {
"resource": ""
} |
q177113 | ResourceAdaptorEntityImpl.getResourceAdaptorInterface | test | public Object getResourceAdaptorInterface(ResourceAdaptorTypeID raType) {
return object.getResourceAdaptorInterface(sleeContainer
.getComponentRepository().getComponentByID(raType)
.getDescriptor().getResourceAdaptorInterface());
} | java | {
"resource": ""
} |
q177114 | ResourceAdaptorEntityImpl.serviceActive | test | public void serviceActive(ServiceID serviceID) {
try {
ReceivableService receivableService = resourceAdaptorContext
.getServiceLookupFacility().getReceivableService(serviceID);
if (receivableService.getReceivableEvents().length > 0) {
object.serviceActive(receivableService);
}
} catch (Thro... | java | {
"resource": ""
} |
q177115 | ResourceAdaptorEntityImpl.derreferActivityHandle | test | ActivityHandle derreferActivityHandle(ActivityHandle handle) {
ActivityHandle ah = null;
if (resourceManagement.getHandleReferenceFactory() != null && handle.getClass() == ActivityHandleReference.class) {
ActivityHandleReference ahReference = (ActivityHandleReference) handle;
ah = resourceManagement.getHa... | java | {
"resource": ""
} |
q177116 | ResourceAdaptorEntityImpl.activityEnded | test | public void activityEnded(final ActivityHandle handle, int activityFlags) {
logger.trace("activityEnded( handle = " + handle + " )");
ActivityHandle ah = null;
if (handle instanceof ActivityHandleReference) {
// handle is a ref, derrefer and remove the ref
ah = resourceManagement.getHandleReferenceFact... | java | {
"resource": ""
} |
q177117 | ResourceAdaptorObjectImpl.raConfigurationUpdate | test | public void raConfigurationUpdate(ConfigProperties properties)
throws InvalidConfigurationException {
if (doTraceLogs) {
logger.trace("raConfigurationUpdate( properties = " + properties
+ " )");
}
verifyConfigProperties(properties);
object.raConfigurationUpdate(configProperties);
} | java | {
"resource": ""
} |
q177118 | ResourceAdaptorObjectImpl.verifyConfigProperties | test | private void verifyConfigProperties(ConfigProperties newProperties)
throws InvalidConfigurationException {
if (doTraceLogs) {
logger.trace("verifyConfigProperties( newProperties = "
+ newProperties + " )");
}
// merge properties
for (ConfigProperties.Property configProperty : configProperties
.... | java | {
"resource": ""
} |
q177119 | ResourceAdaptorObjectImpl.raStopping | test | public void raStopping() throws InvalidStateException {
if (doTraceLogs) {
logger.trace("raStopping()");
}
if (state == ResourceAdaptorObjectState.ACTIVE) {
state = ResourceAdaptorObjectState.STOPPING;
object.raStopping();
} else {
throw new InvalidStateException("ra object is in state " + state);... | java | {
"resource": ""
} |
q177120 | ResourceAdaptorObjectImpl.raInactive | test | public void raInactive() throws InvalidStateException {
if (doTraceLogs) {
logger.trace("raInactive()");
}
if (state == ResourceAdaptorObjectState.STOPPING) {
state = ResourceAdaptorObjectState.INACTIVE;
object.raInactive();
} else {
throw new InvalidStateException("ra object is in state " + state... | java | {
"resource": ""
} |
q177121 | ResourceAdaptorObjectImpl.raUnconfigure | test | public void raUnconfigure() throws InvalidStateException {
if (doTraceLogs) {
logger.trace("raUnconfigure()");
}
if (state == ResourceAdaptorObjectState.INACTIVE) {
state = ResourceAdaptorObjectState.UNCONFIGURED;
object.raUnconfigure();
} else {
throw new InvalidStateException("ra object is in st... | java | {
"resource": ""
} |
q177122 | ResourceAdaptorObjectImpl.unsetResourceAdaptorContext | test | public void unsetResourceAdaptorContext() throws InvalidStateException {
if (doTraceLogs) {
logger.trace("unsetResourceAdaptorContext()");
}
if (state == ResourceAdaptorObjectState.UNCONFIGURED) {
object.unsetResourceAdaptorContext();
state = null;
} else {
throw new InvalidStateException("ra obje... | java | {
"resource": ""
} |
q177123 | ResourceAdaptorObjectImpl.unsetFaultTolerantResourceAdaptorContext | test | @SuppressWarnings("unchecked")
public void unsetFaultTolerantResourceAdaptorContext()
throws IllegalArgumentException {
if (doTraceLogs) {
logger.trace("unsetFaultTolerantResourceAdaptorContext()");
}
if (isFaultTolerant()) {
((FaultTolerantResourceAdaptor<Serializable, Serializable>) this.object)
... | java | {
"resource": ""
} |
q177124 | ProfileSpecificationComponentImpl.buildProfileAttributeMap | test | private void buildProfileAttributeMap() throws DeploymentException {
HashMap<String, ProfileAttribute> map = new HashMap<String, ProfileAttribute>();
Class<?> cmpInterface = getProfileCmpInterfaceClass();
String attributeGetterMethodPrefix = "get";
for (Method method : cmpInterface.getMethods()) {
... | java | {
"resource": ""
} |
q177125 | EventContextSuspensionHandler.resume | test | private void resume() {
// create runnable to resume the event context
Runnable runnable = new Runnable() {
public void run() {
if (scheduledFuture == null) {
// already resumed
return;
}
// cancel timer task
scheduledFuture.cancel(false);
scheduledFuture = null;
// send events... | java | {
"resource": ""
} |
q177126 | ActivityContextFactoryCacheData.getActivityContextHandles | test | @SuppressWarnings("unchecked")
public Set<ActivityContextHandle> getActivityContextHandles() {
final Node node = getNode();
return node != null ? node.getChildrenNames() : Collections.emptySet();
} | java | {
"resource": ""
} |
q177127 | AbstractUsageMBeanImplParent.remove | test | public void remove() {
Logger logger = getLogger();
if (logger.isDebugEnabled()) {
logger.debug("Closing " + toString());
}
final MBeanServer mbeanServer = sleeContainer.getMBeanServer();
try {
mbeanServer.unregisterMBean(getObjectName());
} catch (Exception e) {
logger.error("failed to remove " +... | java | {
"resource": ""
} |
q177128 | AbstractUsageMBeanImplParent.getUsageMBean | test | public ObjectName getUsageMBean(String paramSetName)
throws NullPointerException,
UnrecognizedUsageParameterSetNameException, ManagementException {
if (paramSetName == null)
throw new NullPointerException("Sbb usage param set is null");
return _getUsageMBean(paramSetName);
} | java | {
"resource": ""
} |
q177129 | ProfileAbstractClassDecorator.decorateAbstractClass | test | public boolean decorateAbstractClass() throws DeploymentException {
ClassPool pool = component.getClassPool();
ProfileAbstractClassDescriptor abstractClass = component.getDescriptor().getProfileAbstractClass();
if (abstractClass == null) {
return false;
}
String abstractCla... | java | {
"resource": ""
} |
q177130 | SbbAbstractMethodHandler.fireEvent | test | public static void fireEvent(SbbEntity sbbEntity, EventTypeID eventTypeID,
Object eventObject, ActivityContextInterface aci, Address address) {
fireEvent(sbbEntity, eventTypeID, eventObject, aci, address, null);
} | java | {
"resource": ""
} |
q177131 | SbbAbstractMethodHandler.fireEvent | test | public static void fireEvent(SbbEntity sbbEntity, EventTypeID eventTypeID,
Object eventObject, ActivityContextInterface aci, Address address,
ServiceID serviceID) {
if (sleeContainer.getCongestionControl().refuseFireEvent()) {
throw new SLEEException("congestion control refused event");
}
// JAIN SLEE ... | java | {
"resource": ""
} |
q177132 | SbbAbstractMethodHandler.getProfileCMPMethod | test | public static Object getProfileCMPMethod(SbbEntity sbbEntity,
String getProfileCMPMethodName, ProfileID profileID)
throws UnrecognizedProfileTableNameException,
UnrecognizedProfileNameException {
GetProfileCMPMethodDescriptor mGetProfileCMPMethod = sbbEntity.getSbbComponent()
.getDescriptor().getGetProf... | java | {
"resource": ""
} |
q177133 | SbbAbstractMethodHandler.getSbbUsageParameterSet | test | public static Object getSbbUsageParameterSet(SbbEntity sbbEntity, String name)
throws UnrecognizedUsageParameterSetNameException {
if (logger.isTraceEnabled()) {
logger.trace("getSbbUsageParameterSet(): serviceId = "
+ sbbEntity.getSbbEntityId().getServiceID() + " , sbbID = "
+ sbbEntity.getSbbId() + ... | java | {
"resource": ""
} |
q177134 | ClassUtils.getAbstractMethodsFromClass | test | public static Map getAbstractMethodsFromClass(CtClass sbbAbstractClass) {
HashMap abstractMethods = new HashMap();
CtMethod[] methods = sbbAbstractClass.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
if (Modifier.isAbstract(methods[i].getModifiers())) {
abstractMethods.put(... | java | {
"resource": ""
} |
q177135 | ClassUtils.getInterfaceMethodsFromInterface | test | public static Map getInterfaceMethodsFromInterface(CtClass interfaceClass,
Map exceptMethods) {
HashMap interfaceMethods = new HashMap();
CtMethod[] methods = interfaceClass.getDeclaredMethods();
for (int i = 0; i < methods.length; i++)
{
if (exceptMethods.ge... | java | {
"resource": ""
} |
q177136 | ProfileObjectPoolManagement.createObjectPool | test | public void createObjectPool(final ProfileTableImpl profileTable,
final SleeTransactionManager sleeTransactionManager) {
if (logger.isTraceEnabled()) {
logger.trace("Creating Pool for " + profileTable);
}
createObjectPool(profileTable);
if (sleeTransactionManager != null) {
// add a rollbac... | java | {
"resource": ""
} |
q177137 | ProfileObjectPoolManagement.removeObjectPool | test | public void removeObjectPool(final ProfileTableImpl profileTable,
final SleeTransactionManager sleeTransactionManager) {
TransactionalAction action = new TransactionalAction() {
public void execute() {
if (logger.isTraceEnabled()) {
logger.trace("Removing Pool for " + profileTable);
}
... | java | {
"resource": ""
} |
q177138 | AlarmMBeanImpl.isSourceOwnerOfAlarm | test | public boolean isSourceOwnerOfAlarm(NotificationSourceWrapper notificationSource, String alarmID) {
AlarmPlaceHolder aph = this.alarmIdToAlarm.get(alarmID);
if (aph == null)
return false;
return aph.getNotificationSource().getNotificationSource().equals(notificationSource.getNotificationSource());
} | java | {
"resource": ""
} |
q177139 | AlarmMBeanImpl.raiseAlarm | test | public String raiseAlarm(NotificationSourceWrapper notificationSource, String alarmType, String instanceID, AlarmLevel level, String message, Throwable cause) {
synchronized (notificationSource) {
if (isAlarmAlive(notificationSource, alarmType, instanceID)) {
// Alarm a = this.placeHolderToAlarm.get(new
... | java | {
"resource": ""
} |
q177140 | ProfileManagementHandler.getUsageParameterSet | test | public static Object getUsageParameterSet(ProfileObjectImpl profileObject,
String name) throws UnrecognizedUsageParameterSetNameException {
if (logger.isDebugEnabled()) {
logger.info("[getUsageParameterSet(" + name + ")] @ "
+ profileObject);
}
if (name == null) {
throw new NullPointerExcep... | java | {
"resource": ""
} |
q177141 | EventTypeComponentImpl.getSpecsDescriptor | test | public javax.slee.management.EventTypeDescriptor getSpecsDescriptor() {
if (specsDescriptor == null) {
specsDescriptor = new javax.slee.management.EventTypeDescriptor(getEventTypeID(),getDeployableUnit().getDeployableUnitID(),getDeploymentUnitSource(),descriptor.getLibraryRefs().toArray(new LibraryID[descriptor.... | java | {
"resource": ""
} |
q177142 | SLEESubDeployer.accepts | test | public boolean accepts(URL deployableUnitURL, String deployableUnitName) {
DeployableUnitWrapper du = new DeployableUnitWrapper(deployableUnitURL, deployableUnitName);
URL url = du.getUrl();
if (logger.isTraceEnabled()) {
logger.trace("Method accepts called for " + url + " [DU: " + deployableUnitName + "]");... | java | {
"resource": ""
} |
q177143 | SLEESubDeployer.init | test | public void init(URL deployableUnitURL, String deployableUnitName) throws DeploymentException {
URL url = deployableUnitURL;
DeployableUnitWrapper du = new DeployableUnitWrapper(deployableUnitURL, deployableUnitName);
if (logger.isTraceEnabled()) {
logger.trace("Method init called for " + deployableUnitURL + ... | java | {
"resource": ""
} |
q177144 | SLEESubDeployer.start | test | public void start(URL deployableUnitURL, String deployableUnitName) throws DeploymentException {
DeployableUnitWrapper du = new DeployableUnitWrapper(deployableUnitURL, deployableUnitName);
if (logger.isTraceEnabled()) {
logger.trace("Method start called for " + du.getUrl() + " [DU: " + deployableUnitName + "]"... | java | {
"resource": ""
} |
q177145 | SLEESubDeployer.stop | test | public void stop(URL deployableUnitURL, String deployableUnitName) throws DeploymentException {
if (logger.isTraceEnabled()) {
logger.trace("stop( deployableUnitURL = : " + deployableUnitURL+" )");
}
DeployableUnitWrapper du = new DeployableUnitWrapper(deployableUnitURL, deployableUnitName);
Deployabl... | java | {
"resource": ""
} |
q177146 | SLEESubDeployer.showStatus | test | public String showStatus() throws DeploymentException {
String output = "";
output += "<p>Deployable Units List:</p>";
for (String key : deployableUnits.keySet()) {
output += "<" + key + "> [" + deployableUnits.get(key)
+ "]<br>";
for (String duComponent : deployableUnits.get(key).getComponent... | java | {
"resource": ""
} |
q177147 | TransactionContextImpl.executeAfterCommitActions | test | protected void executeAfterCommitActions() {
if (afterCommitActions != null) {
if (trace) {
logger.trace("Executing after commit actions");
}
executeActions(afterCommitActions,trace);
afterCommitActions = null;
}
} | java | {
"resource": ""
} |
q177148 | TransactionContextImpl.executeAfterCommitPriorityActions | test | protected void executeAfterCommitPriorityActions() {
if (afterCommitPriorityActions != null) {
if (trace) {
logger.trace("Executing after commit priority actions");
}
executeActions(afterCommitPriorityActions,trace);
afterCommitPriorityActions = null;
}
} | java | {
"resource": ""
} |
q177149 | TransactionContextImpl.executeAfterRollbackActions | test | protected void executeAfterRollbackActions() {
if (afterRollbackActions != null) {
if (trace) {
logger.trace("Executing rollback actions");
}
executeActions(afterRollbackActions,trace);
afterRollbackActions = null;
}
} | java | {
"resource": ""
} |
q177150 | TransactionContextImpl.executeBeforeCommitActions | test | protected void executeBeforeCommitActions() {
if (beforeCommitActions != null) {
if (trace) {
logger.trace("Executing before commit actions");
}
executeActions(beforeCommitActions,trace);
beforeCommitActions = null;
}
} | java | {
"resource": ""
} |
q177151 | TransactionContextImpl.executeBeforeCommitPriorityActions | test | protected void executeBeforeCommitPriorityActions() {
if (beforeCommitPriorityActions != null) {
if (trace) {
logger.trace("Executing before commit priority actions");
}
executeActions(beforeCommitPriorityActions,trace);
beforeCommitPriorityActions = null;
}
} | java | {
"resource": ""
} |
q177152 | TracerStorage.getDefinedTracerNames | test | public String[] getDefinedTracerNames() {
Set<String> names = new HashSet<String>();
for (TracerImpl t : this.tracers.values()) {
if (t.isExplicitlySetTracerLevel())
names.add(t.getTracerName());
}
if(names.isEmpty())
return new String[0];
return names.toArray(new String[names.size()]);
} | java | {
"resource": ""
} |
q177153 | TracerStorage.createTracer | test | public Tracer createTracer(String tracerName, boolean requestedBySource) {
TracerImpl tparent = null;
TracerImpl t = tracers.get(tracerName);
if (t == null) {
String[] split = tracerName.split("\\.");
String currentName = "";
for (String s : split) {
if (tparent == null) {
// first loop
t... | java | {
"resource": ""
} |
q177154 | FaultTolerantResourceAdaptorContextImpl.removeReplicateData | test | public void removeReplicateData() {
if (replicatedDataWithFailover != null) {
replicatedDataWithFailover.remove();
replicatedDataWithFailover = null;
}
if (replicatedData != null) {
replicatedData.remove();
replicatedData = null;
}
} | java | {
"resource": ""
} |
q177155 | SleePropertyEditorRegistrator.register | test | public void register() {
PropertyEditorManager.registerEditor(ComponentID.class,
ComponentIDPropertyEditor.class);
PropertyEditorManager.registerEditor(EventTypeID.class,
ComponentIDPropertyEditor.class);
PropertyEditorManager.registerEditor(LibraryID.class,
ComponentIDPropertyEditor.class);
Prop... | java | {
"resource": ""
} |
q177156 | SleeComponentWithUsageParametersClassCodeGenerator.process | test | public void process(SleeComponentWithUsageParametersInterface component) throws DeploymentException {
ClassPool classPool = component.getClassPool();
String deploymentDir = component.getDeploymentDir().getAbsolutePath();
Class<?> usageParametersInterface = component
.getUsageParametersInterface();
if (us... | java | {
"resource": ""
} |
q177157 | SbbObjectPoolManagementImpl.getObjectPool | test | public SbbObjectPoolImpl getObjectPool(ServiceID serviceID, SbbID sbbID) {
return pools.get(new ObjectPoolMapKey(serviceID,sbbID));
} | java | {
"resource": ""
} |
q177158 | SbbObjectPoolManagementImpl.createObjectPool | test | public void createObjectPool(final ServiceID serviceID, final SbbComponent sbbComponent,
final SleeTransactionManager sleeTransactionManager) {
if (logger.isTraceEnabled()) {
logger.trace("Creating Pool for " + serviceID +" and "+ sbbComponent);
}
createObjectPool(serviceID,sbbComponent);
if ... | java | {
"resource": ""
} |
q177159 | SleeEndpointEndActivityNotTransactedExecutor.execute | test | void execute(final ActivityHandle handle)
throws UnrecognizedActivityHandleException {
final SleeTransaction tx = super.suspendTransaction();
try {
sleeEndpoint._endActivity(handle,tx);
} finally {
if (tx != null) {
super.resumeTransaction(tx);
}
}
} | java | {
"resource": ""
} |
q177160 | SleeEndpointImpl._startActivity | test | ActivityContextHandle _startActivity(ActivityHandle handle,
int activityFlags, final SleeTransaction barrierTx) {
ActivityContext ac = null;
if (raEntity.getHandleReferenceFactory() != null
&& !ActivityFlags.hasSleeMayMarshal(activityFlags)) {
final ActivityHandleReference reference = raEntity
.getH... | java | {
"resource": ""
} |
q177161 | SleeEndpointImpl._endActivity | test | void _endActivity(ActivityHandle handle, final SleeTransaction barrierTx)
throws UnrecognizedActivityHandleException {
final ActivityContextHandle ach = new ResourceAdaptorActivityContextHandleImpl(
raEntity, handle);
// get ac
final ActivityContext ac = acFactory.getActivityContext(ach);
if (ac != null)... | java | {
"resource": ""
} |
q177162 | SleeEndpointImpl.checkFireEventPreconditions | test | private void checkFireEventPreconditions(ActivityHandle handle,
FireableEventType eventType, Object event)
throws NullPointerException, IllegalEventException,
IllegalStateException {
if (event == null)
throw new NullPointerException("event is null");
if (handle == null)
throw new NullPointerExcepti... | java | {
"resource": ""
} |
q177163 | SleeEndpointImpl._fireEvent | test | void _fireEvent(ActivityHandle realHandle, ActivityHandle refHandle,
FireableEventType eventType, Object event, Address address,
ReceivableService receivableService, int eventFlags, final SleeTransaction barrierTx)
throws ActivityIsEndingException, SLEEException {
final ActivityContextHandle ach = new Resour... | java | {
"resource": ""
} |
q177164 | ConcreteSbbLocalObjectGenerator.generateSbbLocalObjectConcreteClass | test | public Class generateSbbLocalObjectConcreteClass() {
//Generates the implements link
if (logger.isTraceEnabled()) {
logger.trace("generateSbbLocalObjectConcreteClass: sbbLocalObjectInterface = "
+ sbbLocalObjectName
+ " deployPath = "
... | java | {
"resource": ""
} |
q177165 | AccessorOperation.makeGetter | test | protected void makeGetter() {
if(fieldClass.equals(boolean.class) || fieldClass.equals(Boolean.class)) {
super.operationName = "is" + this.beanFieldName;
} else {
super.operationName = "get" + this.beanFieldName;
}
} | java | {
"resource": ""
} |
q177166 | AccessorOperation.convert | test | protected Object convert(String optArg) throws SecurityException, NoSuchMethodException, IllegalArgumentException,
InstantiationException, IllegalAccessException, InvocationTargetException, CommandException {
if (fieldClass.isPrimitive()) {
// TODO: to optimize, to rework new to valueOf
if (fieldClass.eq... | java | {
"resource": ""
} |
q177167 | ProfileID.setProfileID | test | public final void setProfileID(String profileTableName, String profileName) throws NullPointerException, IllegalArgumentException {
if (profileTableName == null) throw new NullPointerException("profileTableName is null");
if (profileName == null) throw new NullPointerException("profileName is null");
... | java | {
"resource": ""
} |
q177168 | DeployableUnitInstallPanel.extractMessage | test | private String extractMessage(String result) {
// Fix:
// Firefox 2 encapsulates the text inside <pre> tag
String startPreTag = "<pre>";
String endPreTag = "</pre>";
result = result.trim();
if (result.startsWith(startPreTag) && result.endsWith(endPreTag)) {
result = result.sub... | java | {
"resource": ""
} |
q177169 | ChildRelationImpl.contains | test | public boolean contains(Object object) {
if (!(object instanceof SbbLocalObject))
return false;
final SbbLocalObjectImpl sbblocal = (SbbLocalObjectImpl) object;
final SbbEntityID sbbEntityId = sbblocal.getSbbEntityId();
if(!idBelongsToChildRelation(sbbEntityId)) {... | java | {
"resource": ""
} |
q177170 | ChildRelationImpl.containsAll | test | @SuppressWarnings("rawtypes")
public boolean containsAll(Collection c) {
if (c == null)
throw new NullPointerException("null collection!");
for (Iterator it = c.iterator(); it.hasNext(); ) {
if (!contains(it.next())) {
retu... | java | {
"resource": ""
} |
q177171 | ChildRelationImpl.removeAll | test | @SuppressWarnings("rawtypes")
public boolean removeAll(Collection c) {
boolean flag = true;
if (c == null)
throw new NullPointerException(" null collection ! ");
for ( Iterator it = c.iterator(); it.hasNext(); ) {
flag &= this.remove( it.next());
}... | java | {
"resource": ""
} |
q177172 | Level.isHigherLevel | test | public boolean isHigherLevel(Level other) throws NullPointerException {
if (other == null) throw new NullPointerException("other is null");
return this.level < other.level;
} | java | {
"resource": ""
} |
q177173 | Level.readResolve | test | private Object readResolve() throws StreamCorruptedException {
if (level == LEVEL_OFF) return OFF;
if (level == LEVEL_SEVERE) return SEVERE;
if (level == LEVEL_WARNING) return WARNING;
if (level == LEVEL_INFO) return INFO;
if (level == LEVEL_CONFIG) return CONFIG;
if (lev... | java | {
"resource": ""
} |
q177174 | ClassPool.clean | test | public void clean() {
for (ClassPath classPath : classPaths) {
classPool.removeClassPath(classPath);
}
for (String classMade : classesMade) {
try {
classPool.get(classMade).detach();
} catch (NotFoundException e) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to detach class " + cla... | java | {
"resource": ""
} |
q177175 | ProfileCallRecorderTransactionData.addProfileCall | test | @SuppressWarnings("unchecked")
public static void addProfileCall(ProfileObjectImpl po) throws SLEEException
{
SleeTransactionManager sleeTransactionManager = sleeContainer.getTransactionManager();
try {
if(sleeTransactionManager.getTransaction() == null) {
return;
}
}
... | java | {
"resource": ""
} |
q177176 | ProfileTableTransactionView.getProfile | test | public ProfileObjectImpl getProfile(String profileName)
throws TransactionRequiredLocalException, SLEEException {
Map txData = getTxData();
ProfileTransactionID key = new ProfileTransactionID(profileName,
profileTable.getProfileTableName());
ProfileObjectImpl value = (ProfileObjectImpl) txData.get(key);
... | java | {
"resource": ""
} |
q177177 | ProfileTableTransactionView.passivateProfileObjectOnTxEnd | test | public static void passivateProfileObjectOnTxEnd(
SleeTransactionManager txManager,
final ProfileObjectImpl profileObject, final ProfileObjectPool pool) {
TransactionalAction afterRollbackAction = new TransactionalAction() {
public void execute() {
profileObject.invalidateObject();
pool.returnObject(... | java | {
"resource": ""
} |
q177178 | ComponentIDArrayPropertyEditor.setAsText | test | public void setAsText(String text ) {
if ( text == null || text.equals("")) {
super.setValue( new ComponentID[0]);
} else {
java.util.ArrayList results = new java.util.ArrayList();
// the format for component ID is name vendor version.
java.util.Stri... | java | {
"resource": ""
} |
q177179 | ConcreteActivityContextInterfaceGenerator.generateActivityContextInterfaceConcreteClass | test | public Class generateActivityContextInterfaceConcreteClass()
throws DeploymentException {
String tmpClassName = ConcreteClassGeneratorUtils.CONCRETE_ACTIVITY_INTERFACE_CLASS_NAME_PREFIX
+ activityContextInterfaceName
+ ConcreteClassGeneratorUtils.CONCRETE_ACTIVITY_INTERFACE_CLASS_NAME_SUFFIX;
co... | java | {
"resource": ""
} |
q177180 | ConcreteActivityContextInterfaceGenerator.generateConcreteMethods | test | private void generateConcreteMethods(Map interfaceMethods) {
if (interfaceMethods == null)
return;
Iterator it = interfaceMethods.values().iterator();
while (it.hasNext()) {
CtMethod interfaceMethod = (CtMethod) it.next();
if (interfaceMethod != null
//&& isBaseInterfaceMethod(interfaceMeth... | java | {
"resource": ""
} |
q177181 | ActivityContextImpl.setDataAttribute | test | public void setDataAttribute(String key, Object newValue) {
cacheData.setCmpAttribute(key, newValue);
if (logger.isDebugEnabled()) {
logger.debug("Activity context with handle "
+ getActivityContextHandle() + " set cmp attribute named "
+ key + " to value " + newValue);
}
} | java | {
"resource": ""
} |
q177182 | ActivityContextImpl.addNameBinding | test | public void addNameBinding(String aciName) {
cacheData.nameBound(aciName);
if (acReferencesHandler != null) {
acReferencesHandler.nameReferenceCreated();
}
} | java | {
"resource": ""
} |
q177183 | ActivityContextImpl.removeNamingBindings | test | private void removeNamingBindings() {
ActivityContextNamingFacility acf = sleeContainer
.getActivityContextNamingFacility();
for (Object obj : cacheData.getNamesBoundCopy()) {
String aciName = (String) obj;
try {
acf.removeName(aciName);
} catch (Exception e) {
logger.warn("failed to unbind nam... | java | {
"resource": ""
} |
q177184 | ActivityContextImpl.removeNameBinding | test | public boolean removeNameBinding(String aciName) {
boolean removed = cacheData.nameUnbound(aciName);
if (removed && acReferencesHandler != null) {
acReferencesHandler.nameReferenceRemoved();
}
return removed;
} | java | {
"resource": ""
} |
q177185 | ActivityContextImpl.attachTimer | test | public boolean attachTimer(TimerID timerID) {
if (cacheData.attachTimer(timerID)) {
if (acReferencesHandler != null) {
acReferencesHandler.timerReferenceCreated();
}
return true;
} else {
return false;
}
} | java | {
"resource": ""
} |
q177186 | ActivityContextImpl.removeFromTimers | test | private void removeFromTimers() {
TimerFacility timerFacility = sleeContainer.getTimerFacility();
// Iterate through the attached timers, telling the timer facility to
// remove them
for (Object obj : cacheData.getAttachedTimers()) {
timerFacility.cancelTimer((TimerID) obj, false);
}
} | java | {
"resource": ""
} |
q177187 | ActivityContextImpl.attachSbbEntity | test | public boolean attachSbbEntity(SbbEntityID sbbEntityId) {
boolean attached = cacheData.attachSbbEntity(sbbEntityId);
if (attached) {
if (acReferencesHandler != null) {
acReferencesHandler.sbbeReferenceCreated(false);
}
}
if (logger.isTraceEnabled()) {
logger.trace("Attachement from sbb entity " + ... | java | {
"resource": ""
} |
q177188 | ActivityContextImpl.detachSbbEntity | test | public void detachSbbEntity(SbbEntityID sbbEntityId)
throws javax.slee.TransactionRequiredLocalException {
boolean detached = cacheData.detachSbbEntity(sbbEntityId);
if (detached && acReferencesHandler != null && !isEnding()) {
acReferencesHandler.sbbeReferenceRemoved();
if (logger.isTraceEnabled()) {
... | java | {
"resource": ""
} |
q177189 | ActivityContextImpl.getSortedSbbAttachmentSet | test | public Set<SbbEntityID> getSortedSbbAttachmentSet(
Set<SbbEntityID> excludeSet) {
final Set<SbbEntityID> sbbAttachementSet = cacheData
.getSbbEntitiesAttached();
Set<SbbEntityID> result = new HashSet<SbbEntityID>();
for (SbbEntityID sbbEntityId : sbbAttachementSet) {
if (!excludeSet.contains(sbbEntityId... | java | {
"resource": ""
} |
q177190 | ActivityContextImpl.endActivity | test | public void endActivity() {
if (logger.isDebugEnabled()) {
logger.debug("Ending activity context with handle "
+ getActivityContextHandle());
}
if (cacheData.setEnding(true)) {
fireEvent(
sleeContainer
.getEventContextFactory()
.createActivityEndEventContext(
this,
... | java | {
"resource": ""
} |
q177191 | DeployableUnit.addComponent | test | public void addComponent(DeployableComponent dc) {
if (logger.isTraceEnabled())
logger.trace("Adding Component " + dc.getComponentKey());
// Add the component ..
components.add(dc);
// .. the key ..
componentIDs.add(dc.getComponentKey());
// .. the dependencies ..
depende... | java | {
"resource": ""
} |
q177192 | DeployableUnit.getExternalDependencies | test | public Collection<String> getExternalDependencies() {
// Take all dependencies...
Collection<String> externalDependencies = new HashSet<String>(dependencies);
// Remove those which are contained in this DU
externalDependencies.removeAll(componentIDs);
// Return what's left.
return exte... | java | {
"resource": ""
} |
q177193 | DeployableUnit.hasDependenciesSatisfied | test | public boolean hasDependenciesSatisfied(boolean showMissing) {
// First of all check if it is self-sufficient
if (isSelfSufficient())
return true;
// If not self-sufficient, get the remaining dependencies
Collection<String> externalDependencies = getExternalDependencies();
// Remove ... | java | {
"resource": ""
} |
q177194 | DeployableUnit.hasDuplicates | test | public boolean hasDuplicates() {
ArrayList<String> duplicates = new ArrayList<String>();
// For each component in the DU ..
for (String componentId : componentIDs) {
// Check if it is already deployed
if (sleeContainerDeployer.getDeploymentManager().getDeployedComponents().contains(compon... | java | {
"resource": ""
} |
q177195 | DeployableUnit.getInstallActions | test | public Collection<ManagementAction> getInstallActions() {
ArrayList<ManagementAction> iActions = new ArrayList<ManagementAction>();
// if we have some remaining post install actions it means it is actions related with components already installed
// thus should be executed first
if (!postInstall... | java | {
"resource": ""
} |
q177196 | DeployableUnit.getUninstallActions | test | public Collection<ManagementAction> getUninstallActions() {
Collection<ManagementAction> uActions = new ArrayList<ManagementAction>(uninstallActions);
// ensures uninstall is the last action related with DU components
uActions.add(new UninstallDeployableUnitAction(diURL.toString(), sleeContainerDeployer.g... | java | {
"resource": ""
} |
q177197 | DeployableUnit.hasReferringDU | test | private boolean hasReferringDU() throws Exception {
// Get SleeContainer instance from JNDI
SleeContainer sC = SleeContainer.lookupFromJndi();
for (String componentIdString : this.getComponents()) {
ComponentIDPropertyEditor cidpe = new ComponentIDPropertyEditor();
cidpe.setAsText( comp... | java | {
"resource": ""
} |
q177198 | AbstractProfileMBeanImpl.close | test | public static void close(String profileTableName, String profileName) {
final ObjectName objectName = getObjectName(profileTableName, profileName);
if (sleeContainer.getMBeanServer().isRegistered(objectName)) {
Runnable r = new Runnable() {
public void run() {
... | java | {
"resource": ""
} |
q177199 | AbstractProfileMBeanImpl.getObjectName | test | public static ObjectName getObjectName(
String profileTableName, String profileName) {
// FIXME use only the "quoted" version when issue is fully solved at the JMX Console side
try {
return new ObjectName(ProfileMBean.BASE_OBJECT_NAME + ','
+ ProfileMBean.PROF... | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.