jndi

Unable to configure JNDI Read & Connect Timeout properties through Java VM options

时光怂恿深爱的人放手 提交于 2019-12-25 17:20:43
问题 I have configured JNDI read & connect timeout properties through VM options as shown below: -Dcom.sun.jndi.ldap.connect.timeout=5000 -Dcom.sun.jndi.ldap.read.timeout=5000 But it is not working. JNDI read time out fails with below exception: javax.naming.NamingException: LDAP response read timed out, timeout used:-1ms. But if I configured these properties in JNDI environment properties as shown below: env.put("com.sun.jndi.ldap.read.timeout", "5000"); env.put("com.sun.jndi.ldap.connect.timeout

Get EJB object inside rar deployed inside jboss

余生颓废 提交于 2019-12-25 14:48:45
问题 I have an activemq broker deployed within my jboss server. activemq is deployed as a rar file placed in jboss standalone/deployment repository. An other project is also deployed within my jboss as an ear file. This last is exposing some ejb objects in my jboss. I tried to get an ejb from a jar file that I put into my activemq rar file. A class placed within the jar is called when I connect a client to the broker. This is how I tried to get ejb within jar file: Context ctx; Properties

How to retrieve “windows active directory - attributes id's ” in java?

主宰稳场 提交于 2019-12-25 12:54:30
问题 I have searched a lot to get the answer for my question. But I can't . What I have got in search : public class RetrieveUserAttributes { public static void main(String[] args) { RetrieveUserAttributes retrieveUserAttributes = new RetrieveUserAttributes(); retrieveUserAttributes.getUserBasicAttributes("anand", retrieveUserAttributes.getLdapContext()); } public LdapContext getLdapContext(){ LdapContext ctx = null; try{ Hashtable<String, String> env = new Hashtable<String, String>(); env.put

How to retrieve “windows active directory - attributes id's ” in java?

混江龙づ霸主 提交于 2019-12-25 12:52:10
问题 I have searched a lot to get the answer for my question. But I can't . What I have got in search : public class RetrieveUserAttributes { public static void main(String[] args) { RetrieveUserAttributes retrieveUserAttributes = new RetrieveUserAttributes(); retrieveUserAttributes.getUserBasicAttributes("anand", retrieveUserAttributes.getLdapContext()); } public LdapContext getLdapContext(){ LdapContext ctx = null; try{ Hashtable<String, String> env = new Hashtable<String, String>(); env.put

EJB client context selector may not be changed

情到浓时终转凉″ 提交于 2019-12-25 10:31:08
问题 I am trying to access an ejb that is exposed in jbossAS7.1 from code running in an embedded jetty server: final Properties jndiProperties = new Properties(); jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); jndiProperties.put(Context.PROVIDER_URL, "remote://127.0.0.1:4447"); jndiProperties.put("jboss.naming.client.ejb.context", true); jndiProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT",

Error casting context.lookup(…) returned object to ejb3 remote object interface

会有一股神秘感。 提交于 2019-12-25 04:31:47
问题 I have an EJB stateless running under a JBoss server and a client under another JBoss server. In the client side, I am using the following code: final Properties initialContextProperties = new Properties(); initialContextProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); initialContextProperties.put(Context.PROVIDER_URL, "remote://127.0.0.1:8083"); initialContextProperties.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp

NameNotfoundException in Jetty 9 at mail session resource JNDI lookup

只愿长相守 提交于 2019-12-25 01:39:02
问题 I'm writing a REST API backend servlet with Jersey, and I have some problems using jndi to configure mail sending. Here's my WEB-INF/jetty-env.xml: <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"> <Configure id='wac' class="org.eclipse.jetty.webapp.WebAppContext"> <New id="mail" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg><Ref refid="wac"/></Arg> <Arg>mail/Session</Arg> <Arg> <New class="org

Which issue does JNDI solve that ApplicationContext does not solve in Spring?

会有一股神秘感。 提交于 2019-12-24 13:43:18
问题 JNDI is a mean to retrieve/store data or objects from string names. This feature is provided by the container running the application. ApplicationContext allows the creation and retrieval of beans from their string name. Both serve similar needs. Yet, Spring offers means to retrieve objects from JNDI. One can also access JNDI via the JndiTemplate . Is there a real need to use JNDI in Spring? Which problem does it solve that ApplicationContext does not? 回答1: The Application Context would not

How can I update my weblogic JMS queue's target and subdeployment to default and AdminServer?

烈酒焚心 提交于 2019-12-24 13:05:12
问题 I have a problem identical to this question: JNDI lookup failing when looking up JMS queue in WebLogic 10.3.5 However, I can't figure out how to actually implement the solution. It seems simple enough to match the subdeployment and target to the same for both, but it isn't for me: If I change the connectionfactory's subs and target, I get the same error as i used to get on the queue, on the connectionfactory also Default targetting is not an option for queues, only connectionfactories. So how

JNDI InitialContext not working in simple netbeans project

喜你入骨 提交于 2019-12-24 11:00:46
问题 Warning: New to Java I have a simple Netbeans project - I wanted to just learn about interacting with DB's coming from php I thought I would have a go with a local one running on my computer. Lots of the examples out there say to use the InitialContext() object to refer to the database resource. After following the examples I get the following exception - Lots of Google stuff points to some .xml file - which I have no idea about or even where it exists in the Netbeans project? I'm not using a