Spring Framework JndiLocatorSupport - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework JndiLocatorSupport class.

This code example shows how to use the following methods:setResourceRef
	 * "java:comp/env/" needs to be added if the JNDI name doesn't already 
	 * contain it. PersistenceAnnotationBeanPostProcessor's default is "true". 
	 * @see org.springframework.jndi.JndiLocatorSupport#setResourceRef 
	 */ 
	public void setResourceRef(boolean resourceRef) {
		this.jndiLocator.setResourceRef(resourceRef);
	} 
 
	/** 
	 * Specify a JNDI name of the {@link java.util.concurrent.Executor} to delegate to, 
	 * replacing the default JNDI name "java:comp/DefaultManagedExecutorService". 
	 * <p>This can either be a fully qualified JNDI name, or the JNDI name relative 
	 * to the current environment naming context if "resourceRef" is set to "true". 
	 * @see #setConcurrentExecutor 
	 * @see #setResourceRef 
	 */ 
	public void setJndiName(String jndiName) {
		this.jndiName = jndiName;
	} 
 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setResourceRef
	 * "java:comp/env/" needs to be added if the JNDI name doesn't already 
	 * contain it. PersistenceAnnotationBeanPostProcessor's default is "true". 
	 * @see org.springframework.jndi.JndiLocatorSupport#setResourceRef 
	 */ 
	public void setResourceRef(boolean resourceRef) {
		this.jndiLocator.setResourceRef(resourceRef);
	} 
 
	/** 
	 * Specify a JNDI name of the {@link java.util.concurrent.Executor} to delegate to, 
	 * replacing the default JNDI name "java:comp/DefaultManagedScheduledExecutorService". 
	 * <p>This can either be a fully qualified JNDI name, or the JNDI name relative 
	 * to the current environment naming context if "resourceRef" is set to "true". 
	 * @see #setConcurrentExecutor 
	 * @see #setResourceRef 
	 */ 
	public void setJndiName(String jndiName) {
		this.jndiName = jndiName;
	} 
 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 * @see #setJndiTemplate 
 * @see #setJndiEnvironment 
 * @see #setCache 
 * @see #setFallbackToDynamicDestination 
 */ 
public class JndiDestinationResolver extends JndiLocatorSupport implements CachingDestinationResolver {
 
	private boolean cache = true;
 
	private boolean fallbackToDynamicDestination = false;
 
	private DestinationResolver dynamicDestinationResolver = new DynamicDestinationResolver();
 
	private final Map<String, Destination> destinationCache = new ConcurrentHashMap<String, Destination>(16);
 
 
	/** 
	 * Set whether to cache resolved destinations. Default is "true". 
	 * <p>This flag can be turned off to re-lookup a destination for each operation, 
	 * which allows for hot restarting of destinations. This is mainly useful 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setResourceRef
	 * "java:comp/env/" needs to be added if the JNDI name doesn't already 
	 * contain it. PersistenceAnnotationBeanPostProcessor's default is "true". 
	 * @see org.springframework.jndi.JndiLocatorSupport#setResourceRef 
	 */ 
	public void setResourceRef(boolean resourceRef) {
		this.jndiLocator.setResourceRef(resourceRef);
	} 
 
	/** 
	 * Specify a JNDI name of the {@link java.util.concurrent.ThreadFactory} to delegate to, 
	 * replacing the default JNDI name "java:comp/DefaultManagedThreadFactory". 
	 * <p>This can either be a fully qualified JNDI name, or the JNDI name relative 
	 * to the current environment naming context if "resourceRef" is set to "true". 
	 * @see #setResourceRef 
	 */ 
	public void setJndiName(String jndiName) {
		this.jndiName = jndiName;
	} 
 
	@Override 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 * 
 * @author Juergen Hoeller 
 * @since 3.0 
 * @see commonj.timers.TimerManager 
 */ 
public abstract class TimerManagerAccessor extends JndiLocatorSupport
		implements InitializingBean, DisposableBean, Lifecycle {
 
	private TimerManager timerManager;
 
	private String timerManagerName;
 
	private boolean shared = false;
 
 
	/** 
	 * Specify the CommonJ TimerManager to delegate to. 
	 * <p>Note that the given TimerManager's lifecycle will be managed 
	 * by this FactoryBean. 
	 * <p>Alternatively (and typically), you can specify the JNDI name 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 * should be preferred, following JSR-236 support in Java EE 7. 
 * 
 * @author Juergen Hoeller 
 * @since 2.0 
 */ 
public class WorkManagerTaskExecutor extends JndiLocatorSupport
		implements AsyncListenableTaskExecutor, SchedulingTaskExecutor, WorkManager, InitializingBean {
 
	private WorkManager workManager;
 
	private String workManagerName;
 
	private WorkListener workListener;
 
 
	/** 
	 * Specify the CommonJ WorkManager to delegate to. 
	 * <p>Alternatively, you can also specify the JNDI name of the target WorkManager. 
	 * @see #setWorkManagerName 
	 */ 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
	/** 
	 * Create a new WorkManagerTaskExecutor, expecting bean-style configuration. 
	 * @see #setWorkManager 
	 */ 
	public WorkManagerTaskExecutor() { 
	} 
 
	/** 
	 * Create a new WorkManagerTaskExecutor for the given WorkManager. 
	 * @param workManager the JCA WorkManager to delegate to 
	 */ 
	public WorkManagerTaskExecutor(WorkManager workManager) {
		setWorkManager(workManager);
	} 
 
 
	/** 
	 * Specify the JCA WorkManager instance to delegate to. 
	 */ 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:lookup
    @SuppressWarnings("unchecked") 
    public T getTarget(final String context) {
        T target = null;
        try { 
            final String jndiName = this.getJndiName(context);
            target = (T) this.lookup(jndiName);
        } catch (final NamingException e) {
            //Log exception but don't rethrow, that would break the TargetRegistry contract. 
            this.logger.error("Error looking up target for context '{}'", context, e);
        } 
        return target;
    } 
 
    /** 
     * Set the prefix that gets prepended to the context name when building the 
     * jndiname. 
     */ 
    public void setPrefix(final String prefix) {
        this.prefix = (prefix != null ? prefix : "");
    } 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java