jndi

Registering HornetQ resources in Tomcat JNDI (CF / Destination)

How can I put the connection factory and destination of HornetQ into the JNDI of Tomcat? ...

Publishing EJB's local interface in weblogic

Hi, is there a way to lookup an EJB in weblogic if it implements only local interface? If I use this @Remote public interface TestSessionRemote { public void businessMethod(); } @Stateless(mappedName = "A") public class TestSessionBean implements TestSessionRemote { public void businessMethod() { } } the EJB can ...

How to use JNDI in Crystal Reports

Hi! I have a Tomcat 5.5 running which includes a Webapp with the Java Reporting Components (JRC) 2008. The Server has a different data source than the client, and currently I set it with the setConnection() functions on the tables, and it works fine. The downside is, that this taken 800ms (Damn slow crystal) just to set the datasources...

How to disable Active Directory 'change password' when creating the Account from Java?

I can create an Active Directory account, from Java, using sample code from : http://forums.sun.com/thread.jspa?threadID=582103 In active directory 2008, how can I create an Active Directory account whereby the user cannot change password - the sample code suggests setting userAccountControl flag to 0x0040. Can anyone confirm that this...

How to set zeroDateTimeBehavior on JNDI DataSource without using URL ?

In this stackoverflow question the poster implies that you can set zeroDateTimeBehavior="convertToNull" as an attribute on the tag. Does anyone know if this should be possible? All the docs I've looked at say that you can only add this property on the database connection url. I'm actually looking for a way to set this property on the ...

Hibernate datasource trouble

Hi I have a mysql database from which i got netbeans to generate some entities. Netbeans also automatically generates the persistence.xml, sun-resources.xml and hibernate.cfg.xml file. I am new to hibernate so I don't know much about setting it up. All I know is that right now it isn't working and I have tried loads of things which does...

How sets the jdni.properties on ireport

hi i'm using ireport 3.7.2 with ejbql connection my problem is that when i test the connection, fails because Could not find datasource, in the log says: Caused by: org.hibernate.HibernateException: Could not find datasource Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property,...

Parameterizing EAR

I would like to set some read-only parameters (eg. an RMI registry host and port) to a Java EE application deployed on a Glassfish server. The usual place to do this would be the deployment descriptor, but my problem is that it is packaged in the EAR, so I cannot edit it without changing the EAR. I need something similar to setting JDBC...

Java Datasource Management via WebApp

Currently, we store datasource definitions in the Tomcat container inside server.xml and expose environment variables through context.xml. Any time we change an environment variable or datasource, it requires a server restart for those changes to be live. Is there a way that we could create a web application to manage these things? Ins...

JDBC, JNDI Problem with tomcat 6.0.26

Greetings, I am developing a webapp that requires setting up a DataSource with JNDI using Enterprise JDBC Classes.I am using the Netbeans 6.9 bundled tomcat (6.0.26 app) server with mysql 5.xx.The issue really is that I can still see the database values from a relation being displayed in my jsp page whereas during the tomcat initializati...

What are the major motivations to use JNDI for datasources?

I fail to understand why someone would use JNDI. Can someone high light the major reasons to use JNDI for datasources? ...

How do you properly exit from a JNDI enabled client?

After starting a JNDI provider: start rmiregistry I used the following test application to play with the JNDI API: public static void main(String[] args) throws NamingException, MalformedURLException { Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, ...

OSGi bind object to JNDI in Glassfish

New to OSGi and Glassfish. I have an OSGi bundle written that creates a non-serializable manager object that I would like to expose via JNDI so that my web applications can utilize it. (Previously with JBoss I utilized org.jboss.naming.NonSerializableFactory to do this, but I can't seem to find any analogous approach with Glassfish.) ...

What is c++ equivalent of JNDI?

Is there anything equivalent to JNDI in C++? I am not just looking ldap related libraries. I am interested to know the equivalent API's/Libraries available in C++. Common API for look-up, where implementation can handle against DNS, LDAP, Registry, FileSystem, DB. ...

How can i config module and application name for JNDI Lookups

In EJB 3.1 JNDI Lookups can be made with different Lookup-Names: java:global[/<app-name>]/<module-name>/<bean-name>!<fully-qualifiedbean interface-name> java:global[/<app-name>]/<module-name>/<bean-name> java:app/<module-name>/<bean-name>!<fully-qualified-bean-interface-name> java:app/<module-name>/<bean-name> java:module...

Accessing a JNDI DataSource without the java:comp/env prefix

I've noticed that both ways of looking up a DataSource using JNDI work: jdbc/DataSource java:comp/env/jdbc/DataSource With the added bonus that the first one doesn't seem to anger Websphere when used from an unmanaged thread ( started by Quartz ). Are there any pitfalls from accessing JNDI objects without the prefix? ...

com.sun.jndi.ldap.LdapCtxFactory : class not found in servlet

Good morning / afternoon, I have a problem with LDAP connector, when I use it in my unit test no problem, but when it was called in a application server environment, it seems to have classpath issue, but this class is delivred with java 1.6.17 (version I use). I use spring-ldap to initiate my connection. public static LdapContextSourc...

How to add OU into LDAP using JNDI

Hi, I am very new to LDAP and JNDI. Basically i would like to add a new OU into LDAP from JNDI. My LDAP server is setup from OpenDS. Here's my code: public static void main(String args[]) { String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory"; String MY_HOST = "ldap://localhost:1389"; String MGR_DN = "cn=Directory Manager"; ...

LDAP user password authentication using JNDI

public static void main(String[] args) { String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory"; String MY_HOST = "ldap://Localhost:1389"; String MGR_DN = "cn=John,ou=Users,o=IT,dc=QuizPortal"; String MGR_PW = "password"; //Identify service provider to use Hashtable env = new Hashtable(); env.put(Cont...

How to ensure LDAP connection over SSL from JNDI

Hi, I am new to LDAP and JNDI. I have setup a LDAP server with SSL using OpenDS and a client which uses JNDI to access LDAP. What can I do to ensure that I am really communicating via SSL to the LDAP server? This is because I don't really see any difference from the client side when i am trying to accessing LDAP via SSL and without. ...