Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * JBoss, Home of Professional Open Source.
  * Copyright 2011, Red Hat, Inc., and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site:
A EJB client context selector which returns a org.jboss.ejb.client.EJBClientContext based on the thread context classloader that's present when the getCurrent() is invoked.

Jaikiran Pai
    public static final ServiceName TCCL_BASED_EJB_CLIENT_CONTEXT_SELECTOR_SERVICE_NAME = ..append("ejb").append("remote").append("tccl-based-ejb-client-context-selector");

EJB client contexts mapped against the classloader
    public EJBClientContext getCurrent() {
        final ClassLoader tccl = SecurityActions.getContextClassLoader();
        // TODO: Do we fall back on some other CL?
        if (tccl == null) {
            throw ..tcclNotAvailable();
        synchronized (this.) {
            return this..get(tccl);
    public void start(StartContext contextthrows StartException {
    public void stop(StopContext context) {
        // clear the contexts
        synchronized (this.) {
        return this;

Associates a org.jboss.ejb.client.EJBClientContext with the passed classLoader.

ejbClientContext The EJB client context
classLoader The classloader with which the EJB client context has to be associated
    public void registerEJBClientContext(final EJBClientContext ejbClientContextfinal ClassLoader classLoader) {
        synchronized (this.) {
New to GrepCode? Check out our FAQ X