Skip to content

Issue #31167: Support ejblocal: subcontext lookup #31168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IBM-Process-Types: server, \
com.ibm.ws.javaee.version, \
com.ibm.ws.serialization
-jars=com.ibm.websphere.appserver.spi.containerServices; location:=dev/spi/ibm/
-files=dev/spi/ibm/javadoc/com.ibm.websphere.appserver.spi.containerServices_4.0-javadoc.zip
-files=dev/spi/ibm/javadoc/com.ibm.websphere.appserver.spi.containerServices_4.1-javadoc.zip
kind=ga
edition=core
WLP-Activation-Type: parallel
4 changes: 2 additions & 2 deletions dev/com.ibm.websphere.appserver.spi.containerServices/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#*******************************************************************************
# Copyright (c) 2017 IBM Corporation and others.
# Copyright (c) 2017, 2025 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
Expand All @@ -11,7 +11,7 @@
# IBM Corporation - initial API and implementation
#*******************************************************************************
-include= ~../cnf/resources/bnd/bundle.props
bVersion: 4.0
bVersion: 4.1

Bundle-Name: WebSphere Container Services SPI
Bundle-Description: WebSphere Container Services SPI, version ${bVersion}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
/*******************************************************************************
* Copyright (c) 2019, 2020 IBM Corporation and others.
* Copyright (c) 2019, 2025 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-2.0/
*
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.ws.container.service.naming;

import java.util.Collection;
import java.util.List;

import javax.naming.NameClassPair;
import javax.naming.NamingException;

/**
Expand All @@ -39,43 +41,55 @@ public interface EJBLocalNamingHelper<EJBBinding> {
* If the implementer knows about the JNDI resource requested it should
* return the object instance to be returned on the lookup.
*
* @param name
* String form of the jndi name, excluding the namespace prefix
* e.g. for the resource "ejblocal:<app>/<module>.jar/<bean>#<interface>" this name
* would be "<app>/<module>.jar/<bean>#<interface>"
* @param name String form of the jndi name, excluding the namespace prefix
* e.g. for the resource "ejblocal:<app>/<module>.jar/<bean>#<interface>" this name
* would be "<app>/<module>.jar/<bean>#<interface>"
* @return the object instance to be returned on the lookup.
* @throws NamingException
* is thrown when an implementation knows about the the JNDI
* resource, but encounters a problem obtaining an instance
* to return.
* @throws NamingException is thrown when an implementation knows about the the JNDI
* resource, but encounters a problem obtaining an instance
* to return.
*/
public Object getObjectInstance(String name) throws NamingException;

/**
* This method is called by JNDI during "list()" or "listBindings()" to
* provide the names and objects bound into a context.
*
* @param context Sub-context within the namespace where the list operation
* is being performed, e.g. for a list of the "ejblocal:<app>"
* context this context would be "<app>". Must be the empty
* string for the root context.
* @param name String form of the jndi name, excluding the namespace prefix
* and the sub-context (if any), e.g. for the resource
* "ejblocal:<app>/<module>.jar" this name would be
* "<app>/<module>.jar". "" corresponds to the context root,
* and null is not valid.
* @return a Collection of NameClassPair objects
*
* @throws NamingException is thrown if the name specified identifies an object rather than a context.
*/
public Collection<? extends NameClassPair> listInstances(String context, String name) throws NamingException;

/**
* This method adds a JNDI lookup string binding reference.
*
* @param binding
* The EJBBinding Object that represents a reference to a bean
* @param name
* String form of the jndi name, excluding the namespace prefix
* e.g. for the resource "ejblocal:<app>/<module>.jar/<bean>#<interface>" this name
* would be "<app>/<module>.jar/<bean>#<interface>"
* @param isSimpleName
* Flag used to force creation of an AmbiguousEJBReference if an
* ambiguous simple name binding is detected
* @param isDefaultBinding
* Flag used if this is a default binding
* @param binding The EJBBinding Object that represents a reference to a bean
* @param name String form of the jndi name, excluding the namespace prefix
* e.g. for the resource "ejblocal:<app>/<module>.jar/<bean>#<interface>" this name
* would be "<app>/<module>.jar/<bean>#<interface>"
* @param isSimpleName Flag used to force creation of an AmbiguousEJBReference if an
* ambiguous simple name binding is detected
* @param isDefaultBinding Flag used if this is a default binding
* @return false if the binding is an AmbiguousEJBReference
* @throws NamingException
* is thrown if the binding is ambiguous and customBindingsOnErr is FAIL.
* @throws NamingException is thrown if the binding is ambiguous and customBindingsOnErr is FAIL.
*/
boolean bind(EJBBinding binding, String name, boolean isSimpleName, boolean isDefaultBinding) throws NamingException;

/**
* Unbind the names from the ejblocal: name space.
*
* @param names List of names to remove from the
* application name space.
* application name space.
*/
public void removeBindings(List<String> names);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2020 IBM Corporation and others.
* Copyright (c) 2011, 2025 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand All @@ -10,8 +10,8 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
/** @version 2.0 */
@org.osgi.annotation.versioning.Version("2.0")
/** @version 2.1 */
@org.osgi.annotation.versioning.Version("2.1")
@TraceOptions(traceGroup = "Naming")
package com.ibm.ws.container.service.naming;

Expand Down
Loading