Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Hi, I wanna get PMF using JNDI lookup. How can I do?

I have coded client program.

This program is very simple client java program.

...

public static void main(String args[]) {

...

Properties props = new Properties();

props.put(Context.INITIAL_CONTEXT_FACTORY,

"com.sap.engine.services.jndi.InitialContextFactoryImpl");

props.put(Context.PROVIDER_URL,"HOME01:50004");

props.put(Context.SECURITY_PRINCIPAL, "Administrator");

props.put(Context.SECURITY_CREDENTIALS, "erperp");

try {

Context ctx = new InitialContext( props );

pmf = (PersistenceManagerFactory)

ctx.lookup("sap.com/com.sap.jdo/jdo/DefaultPMF");

} catch(NamingException ne) {

System.out.println( ne.toString() );

}

...

}

The props properties is correct.

The ctx.lookup statement is not run correctly.

How can I write this string?

Visual Admin path..

- Deploy Service

- connector

- sap.com/com.sap.jdo

jdo/defaultPMF - connector

...

Former Member
Not what you were looking for? View more on this topic or Ask a question