jndi

Why does Hibernate perform a JNDI lookup?

半城伤御伤魂 提交于 2019-12-14 03:53:33
问题 I have following configuration file - <hibernate-configuration> <session-factory name="HibernateSessionFactory"> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.password">mysql</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

Singleton on multiple JVMs using JNDI [closed]

那年仲夏 提交于 2019-12-14 03:25:24
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . It is said that Singleton is always on per JVM basis, but somebody asked me to create a singleton instance throughout multiple JVMs. I have found a solution to create an object on one JVM, register it with the

How to create a partition in the root in ApacheDS server programmatically using JNDI/LDAP?

余生长醉 提交于 2019-12-13 19:29:47
问题 I'm trying to create a new partition in the root of a ApacheDS Lightweight Directory using JNDI/LDAP. I've failed trying to add it using bind and createSubcontext within the root context. I'm able to create a partition using Apache Directory Studio. Is there a way to programmatically add one using JNDI? 回答1: You cannot create a new partition using code, you first need to configure the partition in the server.xml(if you are using version <= 1.5.7) or in the ou=config area if you are using the

NameNotFoundException when starting JBoss with an EAR using HornetQ ConnectionFactory via JNDI

冷暖自知 提交于 2019-12-13 17:25:23
问题 I am currently trying to deploy an app on JBoss 6.1 which has some JMS MessageListeners in it. The MessageListeners get the connection factory via JNDI (using Spring), I am using the HornetQ default connection factory which is named ConnectionFactory . I am currently just using the default JMS Queues that JBoss starts with: DLQ and ExpiryQueue When I deploy via JMX the app has no problem starting. When I deploy by copying the app in to the deploy directory and start the server the app will

How to get AD user's 'memberof' property value in terms of objectGUID?

梦想与她 提交于 2019-12-13 12:40:21
问题 'memberof' is the attribute on the Active Directory user account which describes user's group membership detail. If we use .Net or Java to get the users detail then we get the 'memberof' attribute value in terms of 'Distinguished Name' of the groups of which user is member of. So is there any way to get these group names in terms of objectGUID either in JAVA or .NET ? 回答1: You can make use of the "Extended DN" LDAP extended control. It can be used only in AD search. C# code: // Here I get the

Externalizing tomcat jdbc connection pool information for different environments

妖精的绣舞 提交于 2019-12-13 12:14:07
问题 Greetings, I'm looking for a good solution for externalizing the JNDI connection pool information in context.xml of a war so that as the application moves from dev to QA to prod, the war file won't need to be recompiled. Ideally the url, driver, username and password would be variablized and then populated by means of a properties file that would customized for each environment. If this isn't possible, are there other suggestions on how to handle moving a war across environments without

Running web app in both Jetty and Tomcat

自古美人都是妖i 提交于 2019-12-13 11:42:04
问题 I have a web app which in production I run on Tomcat. It uses the MySQL connector, however it is not bundled up with the war, rather it is included under Tomcat's common lib directory, so that I can access the data source through JNDI. I would like to do something similar with Jetty (while developing), and more precisely Jetty + Maven. Is there a way for me to include the mysql-connector jar in the classpath when running Jetty through Maven (i.e. not have it bundled in the war file)? Also I

JNDI NameNotFoundException after Tomcat 8 upgrade

别说谁变了你拦得住时间么 提交于 2019-12-13 06:36:07
问题 I upgraded from Tomcat 8.0.18 to 8.0.23 and all of the sudden I have a JNDI issue. I looked at the changelogs, Tomcat 8 Changelogs, and I see three JNDI changes, though none strike me as something that would break a previously working configuration. JNDI related changes were made for bugs 49785, 57587, and an entry under 8.0.19 under "Other". I am receiving this exception when I start up Tomcat with 8.0.23: javax.naming.NameNotFoundException: Name [jdbc/MyCluster] is not bound in this Context

JNDI ClassCastException

喜欢而已 提交于 2019-12-13 06:10:33
问题 I am attempting to use JNDI with a custom DataSource called CEDataSource. From my understanding for this to work I would have to create a custom factory as well. So I created a custom factory that would return the CEDataSource object but now when I attempt to use this in Java with Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); // Look up our data source CEDataSource ds = (CEDataSource)envCtx.lookup("jdbc/cePu"); I get the exception

Connect LDAP from Spring

你离开我真会死。 提交于 2019-12-13 06:00:04
问题 I have to realize a web application based on Spring, allowing the user to manage LDAP data. The connection to the LDAP should be done only with the JNDI framework (no SpringLDAP allowed). For this, I realized a utility class to do the basic operations (add, update, delete, list, ...). Here is a short block of code of this class : public class LdapUtility { private static LdapUtility instance; private DirContext dirContext; public static LdapUtility getInstance() { if(LdapUtility.instance ==