Skip to content

WebLogic JNDI lookup syntax

WebLogic Server uses the Java Naming and Directory Interface (JNDI) to locate resources and EJBs. The standard syntax for looking up a remote object in WebLogic JNDI follows a specific pattern that combines the JNDI name with the fully qualified business interface name, separated by the # symbol.^[600-developer-java-application-server-weblogic-weblogic-ejb.md]

Syntax Pattern

The general format for a WebLogic JNDI lookup string is: [JNDI Name]#[Fully Qualified Interface Name]

  • JNDI Name: The logical name assigned to the resource in the WebLogic container (e.g., bpm/ejb/WorkflowEngineService).
  • # Separator: A literal hash character used to delimit the JNDI name from the interface name.
  • Interface Name: The complete name of the remote business interface (e.g., core.bpm.service.workflow.engine.WorkflowEngineServiceRemote).^[600-developer-java-application-server-weblogic-weblogic-ejb.md]

Usage Example

When using the InitialContext to perform a lookup, the combined string is passed directly to the lookup() method.

Object obj = ctx.lookup("bpm/ejb/WorkflowEngineService#core.bpm.service.workflow.engine.WorkflowEngineServiceRemote");

In this example, the client retrieves the remote EJB interface WorkflowEngineServiceRemote bound under the name bpm/ejb/WorkflowEngineService.^[600-developer-java-application-server-weblogic-weblogic-ejb.md]

  • [[Java Naming and Directory Interface]]
  • [[EJB]]

Sources

  • 600-developer-java-application-server-weblogic-weblogic-ejb.md