jndi

access JRUN jndi environment vaiables from coldfusion (java)

I want to put some instance specific configuration information in JNDI. I looked at the information here: http://www.adobe.com/support/jrun/working_jrun/jrun4_jndi_and_j2ee_enc/jrun4_jndi_and_j2ee_enc03.html I have added this node to the web.xml: <env-entry> <description>Administrator e-mail address</description> <env-entry-name>ad...

Hows does Seam injection work in Ejb3

Hello We are using Seam 2.2.0 Java 1.6.14 Weblogic 10.3.1.0 (named 11g Doh!) I have looked at Seam reference Seam in action These web pages However I still do not understand how to inject an EJB3 bean into a JSF backing bean. It seems to me that I have to (correct me if I am wrong) Annotate with @Name my backing bean Annotate...

Where can I learn about JNDI strings?

How do you know how to form a JNDI string? I know there must be a format and that the divisions must mean something but I haven't been able to find a good resource that explains them. For example: java:comp/env/wm/default. This is supposed to connect to a WorkManager in Websphere with the name of default. But what does the "java", "c...

What does sub error code 568 mean for Ldap Error 49 with Active Directory

I am writing some Java code that authenticates to Active Directory using SASL GSSAPI. Mostly this code is working fine but for one user I am getting the response: javax.naming.AuthenticationException: [LDAP: error code 49 - 8 0090304: LdapErr: DSID-0C0904D1, comment: AcceptSecurityContext error, data 568, v1772 ] I know that 49 means...

How to create a new Active Directory Account from Java (via JNDI)?

Hi: Is it possible to create a new user in AD rom Java via JNDI? I tried via trusty Google but nothing came up - maybe I was googling using the wrong terminology (JNDI Active Directory Create User). Any tips will be create appreciated. Current status: I have connected to AD via my Java code and can change attributes of existing AD a...

does python have any service like jndi?

Hello, I wanted to know if python had any service like Java's JNDI. More specifically, I want a service where providers can register themselves and then consumers can ask fro where certain provider end-points are. For example, assume that I want to implement a mailbox for all my friends. Each of them have their own end-point, so friend...

Trying to Unit Test A Class That Makes DB Queries Using Hibernate And Can't Get Session Created...

I am trying to implement JUnit tests for a class that performs DB queries using Hibernate. When I create the class under test, I get access to the session through the factory by doing the following: InitialContext context = new InitialContext(); sessionFactory = (SessionFactory) context.lookup(hibernateContext); This works fine when ...

How to tell Seam to inject a local EJB interface (SLSB) and not the remote EJB interface (SLSB)?

Hello, I am using Seam with JBoss AS. In my application I have a SLSB which is also declared as a seam component using the @Name annotation. I am trying to inject and use this SLSB in another seam component using the @In annotation. My problem is that sometimes Seam injects the local interface (then the code runs fine) and sometimes ...

By using ejb3 and jsf do I still have to do jndi lookup?

I am not sure jndi lookup is necessary or not in terms of ejb3 technology advantages. Any help would be appreciated, thanks. ...

EJB3 JNDI Lookup Failure in JEE application client

I'm trying to access an EJB3 from a JEE client-application, but keep getting nothing but lookup failures. The client application is running within the JEE Application Client Container. My JEE Application 'CoreServer' is exposing a number of beans with remote interfaces. I have no problem accessing them from a Web Application deployed on...

Specify cache expiry for com.sun.jndi.dns.DnsContextFactory?

Struggling to find comprehensive documentation for JNDI and DNS. There is some here but it's rather limited. Specific question: Is it possible to control the caching behaviour of lookups against DNS using com.sun.jndi.dns.DnsContextFactory, for example to say 'do not cache'. Example code: Hashtable<String, String> env = new Hashtable<...

How does java LoginContext.login() work?

I have this code to create a configuration of a java client to connect to a JBoss application server: System.setProperty( "java.security.auth.login.config", "auth.conf" ); LoginContext auth = new LoginContext( "myAuth", new LoginCallbackHandler( username, password ) ); auth.login(); The file auth.conf contains the following lines...

How to set up jndi.properties for DataStore?

I'm struggling to set connect a Java program to MySQL using JPA/Hibernate. I'm currently getting the following error when I try to call createEntityManagerFactory(): [main] ERROR org.hibernate.connection.DatasourceConnectionProvider - Could not find datasource: java:jdbc/myDataDS javax.naming.NoInitialContextException: Need to specify ...

How to synchronize placing an object in JNDI across processes?

I am trying to place an object in JNDI, so that only one of the progam should be able to place it in JNDI. is there any global lock that can be used in J2EE environment. Is RMI can be used for this purpose? please provide any reference links. Thanks in advance. Also, what is NameAlreadyBoundexception? I am trying to use it as a method t...

How to override TOMCAT Oracle ojdbc14 driver in the application?

The TOMCAT server is using an Oracle 9G ojdbc14 driver to its jndi connections in the /common/lib folder. My web application uses Maven + Spring and I'm getting the dataSource using Spring jndi features. I'm trying to bypass TOMCAT old ojdbc14 driver with a newer one (ojdbc14 10.2.0.4.0). I've tried putting the jars in the WEB-INF/lib ...

what does # character means in JNDI lookup?

hi every one does any one know that "what does '#' character means in JNDI look up?" like: helloUser = (HelloUser) ctx.lookup("HelloUser#ejb3inaction.example.HelloUser"); thanks a lot ...

InvalidAttributeValueException when using non-ascii characters in JNDI

Hi, I have some trouble using JNDI since it accepts only 7-bits encoded parameters. I am trying to change an LDAP entry using JNDI with the following code : Attribute newattr = new BasicAttribute("userpassword", password); ModificationItem[] mods = new ModificationItem[1]; mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, n...

JNDI InvalidnameException for CN 'LastName, FirstName'

Hi: I am writing to active directory using JNDI, it is successful for "CN=Yuri Gagarin,OU=Admins,DC=ead,DC=ubc,DC=ca"; but fails for "CN=Gagarin, Yuri,OU=Admins,DC=ead,DC=ubc,DC=ca". I need to store displayName, cn, name in the format 'lastName, FirstName'. What do I need to do to get this going? Thanks very much. ...

JEE6 Global JNDI Name and Maven Deployment

I'm having some problems with the global JNDI names of my EJB resources which is (or at least will) cause my JNDI look ups to fail. The project is being developed on Netbeans and is a standard Maven Web Application. When my application is deployed to GF3.0 the application name is set to something like: com.example_myapp_war_1.0-SNAPSHOT...

How to configure the roles in my tomcat application to work with JNDI(WIN AUTH)

Hi, I'm trying to change the authentication mode of my application from JDBC-REALM to JNDI-REALM. I configured the following section inside the Server.xml <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionURL="ldap://****:389/DC=onsetinc,DC=com??sAMccountName?sub?(objectClass=*)" connectionName="user...