jndi

Application using Pooled JDBC Connections

I'm working with a legacy WebLogic application that contains a web-service application and a standalone, command-line application. Both need access to a common database and I would like to try and get the command-line application use a pooled connection to the web-server's JDBC connection. (The standalone application can only be run wh...

Web-based LDAP Browser

Is anyone aware of an "web-based" application that allows developers to browse an LDAP server and view objectClasses and attributeClasses? Ideally I would love something open source that is written in either Java or .NET. ...

JNDI Help regarding group group membership in Active Directory

Hi, I am trying to add a group to a different group in Active Directory using a JNDI program. On doing so, I get the following error [LDAP: error code 53 - 00002142: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0 The code snippet I am using is below Setting Group Attributes Attributes attrs = new BasicAtt...

Choosing an RDN for new objectClasses in LDAP?

What are the best practices for choosing an RDN when creating new objectClasses in LDAP? I know you can choose from uid, cn, ou, and so on, but what practices should one follow? ...

Need help with design structure and looking up EntityManager and UserTransaction in helper's helper

Hi there, I am basically a newbie whose starting work on a new webapp. The webapp is mostly your basic CRUD operations. For this, I have decided to use JPA with Hibernate as the Persistence provider and will be developing on Apache Derby for development and testing purposes. I am using GlassFish v2 as the App Server to deploy my EJB3 be...

How to get stateless EJBs JNDI path?

Hi, is there a way to get my stateless EJBs JNDI path? Supposing that I have written an EJB like this: @Stateless public class BookBean implements IBookBeanLocal { @Resource SessionContext sctx; .... @PostConstruct public void afterInit(){ // sctx?? } } Is there a way do discover the BookBeans JNDI path during initialization...

What do I need to do to integrate JTA into a J2SE application?

Suppose I want to implement an application container. Not a full-on JEE stack, but I need to provide access to JDBC resources and transactions to third party code that will be deployed in an application I'm writing. Suppose, further, that I'm looking at JBossTS for transactions. I'm not settled on it, but it seems to be the best fit f...

Java EE and application servers - What can i do?

Hi everyone! I decided that it is time for me to dig into the whole Java EE stuff. I am using EE some techniques whithin Java SE like JPA or JMS, but i still messing around with Java SE and i believe Java EE and an application server will solve some of my problems i have. BUT: I have still some questions after reading some articles on ...

Attribute is not being renamed by this code in Ldap.

/** * * ModifyRDN .java * Sample code to demostrate how ModifyRDN/ModifyDN works. * */ import javax.naming.; import javax.naming.directory.; import java.util.Hashtable; public class ModifyRDN { public static void main(String[] args) { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,"co...

Centralized DB connection management in Java

For compliance reasons, my organization is looking to take our database connection settings out of properties/XML config files and into a central registry - ideally federated over multiple physical machines, to avoid a single point of failure. I have been looking at the possibility of using JNDI to achieve this, but haven't really got m...

Multiple dynamic data sources for a servlet context

I'm developing a java servlet web application that manages information from multiple databases (all structurally the same) each corresponding to a different "business". The user selects "the current business" which is stored in the session and the application can display or modify that "current business". I would like to use tomcat ...

How do I accomplish the following in LDAP?

I would like to accomplish this goal using AD/ADAM The ability to make an email or other attributeClass as part of inetOrgPerson globally unique across entries The ability to attach a regular expression to an attribute for validation purposes The ability to provide a constraint of enumerated choices such as choosing from a list of vali...

How to specify a different jndi-name than the default for an EJB in JBoss 4.2.2.GA?

By default it seems the jndi name of a bean is based on the ear in which it is contained. An EJB named MyBean my-app.ear will have the name "my-app/MyBean/local". How can I change that behavior declaratively? I want the jndi name to be "something-else/MyBean/local". It has to be declarative rather than with an annotation b/c I can'...

JNDI Name binding in JBOSS 5.1.0 Beta

Hi, I am following the MasteringEJB4thEdition book, which I downloaded from The Server Site website. There is a simple example of HelloBean, which works perfectly with GlassFish V3 app server. The same example when deployed on JBOSS fails because of JNDI name lookup. Is there any rule how the JNDI lookup names in JBOSS are decided if ...

Tomcat JNDI error

I get this error Jun 23, 2009 4:49:10 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5265 ms 0 [http-8080-Processor25] ERROR Could not load security-xss-regex.txt file. [at app.sparx.navigate.AppNavigationControllerServlet.init(AppNavigationControllerServlet.java:45)] Unable to register any web resourc...

Dynamically access multiple databases?

My question is very related to this one: http://stackoverflow.com/questions/932625/multiple-dynamic-data-sources-for-a-servlet-context. However I haven’t found a proper solution just yet and would like to ask it again. I have a little JSF application that talks to a MS SQL Server via JDBC. Tomcat is used as the web container. The applic...

Adding LDAP entries using JNDI

I am trying to add an entry to an LDAP server using JNDI. I could successfully read the entries from the LDAP server. But when I try to add a new entry I am getting the errors. I checked various ways but I failed. private String getUserAttribs (String searchAttribValue) throws NamingException{ SearchControls ctls = new SearchContro...

can't get DB Connection using JNDI datasource on JBoss

I'm studying how to build java webapps for JBossAS 5.1.0 and I'm trying to build a very basic jsp web app on JBossAS5 using a JNDI datasource for data access. When trying to open a connection I get this exception: 21:42:52,834 ERROR [STDERR] Cannot get connection: org.jboss.util.NestedSQLException: Unable to get managed connection fo...

How to shrink DB Connection Pool?

I am using Apache DBCP with JNDI in my tomcat container to pool connections to a mysql database. Everything works fine but a problem i am seeing is that once a pconnection is pooled it is never released. So after a load spike connection sit their forever sleeping. Is their a way to shrink the pool through context.xml parameters? here...

Access objects through JNDI from an external JVM in Atg Dyanmo Application Server

Hi Everyone, I am trying to access some objects using JNDI from an external JVM in Atg Dyanmo Application Server. I am using the following code - import java.util.Hashtable; import javax.naming.Context; import javax.naming.InitialContext; public class URLTest { public static Object getNamedObject() { Object o ...