Tabnine Logo
org.jboss.ejb.client
Code IndexAdd Tabnine to your IDE (free)

How to use org.jboss.ejb.client

Best Java code snippets using org.jboss.ejb.client (Showing top 20 results out of 315)

origin: wildfly/wildfly

@Override
public <T> void setLocator(EJBLocator<T> locator) {
  super.setLocator(locator);
  Affinity affinity = locator.getAffinity();
  if (affinity instanceof ClusterAffinity) {
    ClusterAffinityInterest interest = invocationHandler.getAttachment(ClusterAffinityInterest.KEY);
    if (interest != null) {
      interest.notifyAssignment((ClusterAffinity)affinity);
    }
  }
}
origin: wildfly/wildfly

/**
 * Get the proxy class for this locator.
 *
 * @return the proxy class
 */
public Class<? extends T> getProxyClass() {
  return getProxyInformation().getProxyClass();
}
origin: wildfly/wildfly

<T> EJBSessionCreationInvocationContext createSessionCreationInvocationContext(StatelessEJBLocator<T> statelessLocator, AuthenticationContext authenticationContext) {
  EJBClientContext.InterceptorList interceptorList = getInterceptors(statelessLocator.getViewType());
  return new EJBSessionCreationInvocationContext(statelessLocator, this, authenticationContext, interceptorList);
}
origin: wildfly/wildfly

public StatefulEJBLocator<T> withSessionAndAffinity(final SessionID sessionId, final Affinity affinity) {
  Assert.checkNotNullParam("sessionId", sessionId);
  Assert.checkNotNullParam("affinity", affinity);
  return getAffinity().equals(affinity) && getSessionId().equals(sessionId) ? this : new StatefulEJBLocator<T>(this, sessionId, affinity);
}
origin: wildfly/wildfly

public AbstractEJBMetaData<?, ?> toAbstractEJBMetaData() {
  final EJBHomeLocator<? extends EJBHome> homeLocator = EJBClient.getLocatorFor(home).narrowAsHome(homeClass);
  final Class<? extends EJBObject> ejbObjectClass = remoteClass.asSubclass(EJBObject.class);
  if (session || statelessSession) {
    if (statelessSession) {
      return StatelessEJBMetaData.create(ejbObjectClass, homeLocator);
    }
    return StatefulEJBMetaData.create(ejbObjectClass, homeLocator);
  } else {
    return EntityEJBMetaData.create(ejbObjectClass, homeLocator, pkClass);
  }
}
origin: wildfly/wildfly

static Application toApplication(EJBIdentifier id) {
  return new Application(id.getAppName(), id.getModuleName(), id.getDistinctName());
}
origin: wildfly/wildfly

public Object handleInvocationResult(final EJBClientInvocationContext context) throws Exception {
  try {
    return context.getResult();
  } catch (NoSuchEJBException | RequestSendFailedException e) {
    if (context.getAttachment(SKIP_MISSING_TARGET) != Boolean.TRUE) {
      processMissingTarget(context);
    }
    throw e;
  } finally {
    context.removeAttachment(SKIP_MISSING_TARGET);
  }
}
origin: wildfly/wildfly

private static <T extends EJBObject, H extends EJBHome> StatefulEJBMetaData<T, ? extends H> createStatefulMetaData(Class<T> remoteClass, Class<H> homeClass, EJBHome home) {
  return new StatefulEJBMetaData<>(remoteClass, EJBClient.getLocatorFor(home).<H>narrowAsHome(homeClass));
}
origin: wildfly/wildfly

private static <T extends EJBObject, H extends EJBHome> StatelessEJBMetaData<T, ? extends H> createStatelessMetaData(Class<T> remoteClass, Class<H> homeClass, EJBHome home) {
  return new StatelessEJBMetaData<>(remoteClass, EJBClient.getLocatorFor(home).<H>narrowAsHome(homeClass));
}
origin: wildfly/wildfly

private static <T extends EJBObject, H extends EJBHome> EntityEJBMetaData<T, ? extends H> createEntityMetaData(Class<T> remoteClass, Class<H> homeClass, EJBHome home, Class<?> pkClass) {
  return new EntityEJBMetaData<>(remoteClass, EJBClient.getLocatorFor(home).<H>narrowAsHome(homeClass), pkClass);
}
origin: wildfly/wildfly

/**
 * Create a new EJB session.
 *
 * @param viewType     the view type class
 * @param appName      the application name
 * @param moduleName   the module name
 * @param beanName     the EJB name
 * @param <T> the view type
 * @return the new EJB locator
 * @throws CreateException if an error occurs
 */
public static <T> StatefulEJBLocator<T> createSession(final Class<T> viewType, final String appName, final String moduleName, final String beanName) throws Exception {
  return createSession(new StatelessEJBLocator<T>(viewType, appName, moduleName, beanName, Affinity.NONE));
}
origin: wildfly/wildfly

/**
 * Determine whether this object is equal to another.
 *
 * @param other the other object
 * @return {@code true} if they are equal, {@code false} otherwise
 */
public boolean equals(final StatefulEJBLocator<?> other) {
  return super.equals(other) && sessionId.equals(other.sessionId);
}
origin: wildfly/wildfly

int calculateHashCode() {
  return sessionId.hashCode() * 13 + super.calculateHashCode();
}
origin: wildfly/wildfly

/**
 * Get a copy of this stateful EJB locator, but without any session ID.
 *
 * @return the stateless EJB locator (not {@code null})
 */
public StatelessEJBLocator<T> withoutSession() {
  return new StatelessEJBLocator<T>(this, getAffinity());
}
origin: wildfly/wildfly

/**
 * Determine whether this object is equal to another.
 *
 * @param other the other object
 * @return {@code true} if they are equal, {@code false} otherwise
 */
public boolean equals(EJBLocator<?> other) {
  return this == other || other != null && hashCode == other.hashCode
      && identifier.equals(other.identifier)
      && affinity.equals(other.affinity);
}
origin: wildfly/wildfly

/**
 * Determine whether the method is definitely synchronous, that is, it is not marked client-async, and the return
 * value of the method is not {@code void} or {@code Future<?>}.
 *
 * @return {@code true} if the method is definitely synchronous, {@code false} if the method may be asynchronous
 */
public boolean isSynchronous() {
  return ! isClientAsync() && methodInfo.isSynchronous();
}
origin: wildfly/wildfly

/**
 * Get the proxy class constructor for this locator.  A proxy class constructor accepts a single
 * argument of type {@link InvocationHandler}.
 *
 * @return the proxy constructor
 */
public Constructor<? extends T> getProxyConstructor() {
  return getProxyInformation().getProxyConstructor();
}
origin: wildfly/wildfly

/**
 * Determine whether the method is marked client-asynchronous, meaning that invocation should be asynchronous regardless
 * of whether the server-side method is asynchronous.
 *
 * @return {@code true} if the method is marked client-asynchronous, {@code false} otherwise
 */
public boolean isClientAsync() {
  return invocationHandler.isAsyncHandler() || methodInfo.isClientAsync();
}
origin: wildfly/wildfly

InterceptorList getGlobalInterceptors() {
  return globalInterceptors.combine(registeredInterceptors());
}
origin: wildfly/wildfly

private boolean equals(XidImpl other) {
  return this == other || other != null && XidTransactionID.this.equals(other.getXidTransactionID());
}
org.jboss.ejb.client

Most used classes

  • EJBClientContext
    The public API for an EJB client context. An EJB client context may be associated with (and used by)
  • PropertiesBasedEJBClientConfiguration
  • SessionID
    A session ID for a stateful EJB. Session IDs can be stored in multiple formats with different charac
  • ConfigBasedEJBClientContextSelector
  • ClusterAffinity
    A cluster affinity specification.
  • NodeAffinity,
  • EJBClientInvocationContext,
  • EJBLocator,
  • EJBReceiverInvocationContext,
  • StatefulEJBLocator,
  • Affinity,
  • EJBHandle,
  • EJBHomeHandle,
  • EJBHomeLocator,
  • EJBIdentifier,
  • EJBMetaDataImpl,
  • EJBReceiverContext,
  • EJBReceiverSessionCreationContext,
  • EJBSessionCreationInvocationContext
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now