Skip to content

Commit

Permalink
[WFLY-11440] Refactoring - removing deprecated EJBUtilities class.
Browse files Browse the repository at this point in the history
  • Loading branch information
ropalka committed Nov 29, 2018
1 parent 796c816 commit e659e2d
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 313 deletions.
Expand Up @@ -63,6 +63,7 @@
import org.jboss.as.ejb3.logging.EjbLogger;
import org.jboss.as.ejb3.security.EJBSecurityMetaData;
import org.jboss.as.ejb3.security.JaccInterceptor;
import org.jboss.as.ejb3.subsystem.EJBStatistics;
import org.jboss.as.ejb3.suspend.EJBSuspendHandlerService;
import org.jboss.as.ejb3.timerservice.TimerServiceImpl;
import org.jboss.as.ejb3.tx.ApplicationExceptionDetails;
Expand All @@ -89,6 +90,7 @@

/**
* @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a>
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public abstract class EJBComponent extends BasicComponent implements ServerActivityCallback {

Expand All @@ -98,7 +100,6 @@ public abstract class EJBComponent extends BasicComponent implements ServerActiv
private final Map<MethodTransactionAttributeKey, Integer> txTimeouts;
private final Map<MethodTransactionAttributeKey, Boolean> txExplicitAttrs;

private final EJBUtilities utilities;
private final boolean isBeanManagedTransaction;
private final Map<Class<?>, ApplicationExceptionDetails> applicationExceptions;
private final EJBSecurityMetaData securityMetaData;
Expand Down Expand Up @@ -145,11 +146,7 @@ public Principal run() {
*/
protected EJBComponent(final EJBComponentCreateService ejbComponentCreateService) {
super(ejbComponentCreateService);


this.applicationExceptions = Collections.unmodifiableMap(ejbComponentCreateService.getApplicationExceptions().getApplicationExceptions());

this.utilities = ejbComponentCreateService.getEJBUtilities();
final Map<MethodTransactionAttributeKey, TransactionAttributeType> txAttrs = ejbComponentCreateService.getTxAttrs();
if (txAttrs == null || txAttrs.isEmpty()) {
this.txAttrs = Collections.emptyMap();
Expand Down Expand Up @@ -468,7 +465,7 @@ public boolean isCallerInRole(final String roleName) throws IllegalStateExceptio
}

public boolean isStatisticsEnabled() {
return utilities.isStatisticsEnabled();
return EJBStatistics.getInstance().isEnabled();
}

public Object lookup(String name) throws IllegalArgumentException {
Expand Down
Expand Up @@ -50,12 +50,10 @@
import org.jboss.as.ejb3.security.EJBSecurityMetaData;
import org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService.ApplicationSecurityDomain;
import org.jboss.as.ejb3.suspend.EJBSuspendHandlerService;
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.invocation.InterceptorFactory;
import org.jboss.invocation.Interceptors;
import org.jboss.invocation.proxy.MethodIdentifier;
import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.value.InjectedValue;
import org.wildfly.extension.requestcontroller.ControlPoint;
Expand All @@ -64,6 +62,7 @@

/**
* @author Jaikiran Pai
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public class EJBComponentCreateService extends BasicComponentCreateService {

Expand Down Expand Up @@ -233,18 +232,6 @@ private static Method getComponentMethod(final ComponentConfiguration componentC
}
}

/**
* @return
* @deprecated {@link EJBUtilities} is deprecated post 7.2.0.Final version.
*/
@Deprecated
protected EJBUtilities getEJBUtilities() {
// constructs
final DeploymentUnit deploymentUnit = getDeploymentUnitInjector().getValue();
final ServiceController<EJBUtilities> serviceController = (ServiceController<EJBUtilities>) deploymentUnit.getServiceRegistry().getRequiredService(EJBUtilities.SERVICE_NAME);
return serviceController.getValue();
}

Map<MethodTransactionAttributeKey, TransactionAttributeType> getTxAttrs() {
return txAttrs;
}
Expand Down
201 changes: 0 additions & 201 deletions ejb3/src/main/java/org/jboss/as/ejb3/component/EJBUtilities.java

This file was deleted.

0 comments on commit e659e2d

Please sign in to comment.