jndi

Using bonecp as Tomcat 5.5 datasource

时间秒杀一切 提交于 2019-12-05 17:01:32
I try to get Tomcat to use BoneCP as a connection pool because DBCP doesn't work correctly here. I tried to add it to the context.xml that defines my webapp like this: <Context path="/reports" privileged="true" crossContext="true"> <Resource name="jdbc/IKOffice" type="com.jolbox.bonecp.BoneCPDataSource" auth="Container" username="ik" password="******" jdbcUrl="jdbc:postgresql://localhost:5434/IKOffice_Core" lazyInit="true" partitionCount="1" ... more properties ... logStatementsEnabled="false" /> </Context> But when I try to access the resource, it always says: javax.naming.NamingException:

WebLogic11g-EJB部署

送分小仙女□ 提交于 2019-12-05 14:40:40
weblogic部署ejb可以通过jar、ear方式。 两种部署ejb方式的步骤都是一致的 1、启动domain,并登录控制台 2、选择“部署”-》“安装”,如下图所示: 3、选择ejb程序(这里以jar方式为例),选择ejb-service.jar,如图所示: 4、选择部署的目标,注意这里选择的是AdminServer、cluster,如图所示: 【注意:这里选中AdminServer只是方便从jndi树中查看ejb服务,真正提供ejb服务的还是server1、server2】 5、继续下一步,直到完成即可。部署成功之后,如图所示: 可以看到类型为EJB,状态为活动。至此ejb应用已经部署成功,如何查看ejb的jndi呢?往下看。 查看weblogic的jndi树: 选择“服务器”-》“AdminServer”-》“配置”-》“一般信息”-》“查看JNDI树”,如图所示: 点击上图的链接,打开新的页面,展现jndi的树结构,如下图所示: 我们在jndi的树结构中找到ejb应用程序的jndi(例子中有两个remote的ejb,分别是SessionEJB、SwapEJBBean 客户端调用时,需要使用右栏的“绑定名”作为jndi的名称,代码如下: package example.ejb; import java.util.Properties; import javax.naming

Using JNDI for Database connections

陌路散爱 提交于 2019-12-05 14:04:27
This might sound like a noob question but this is the first time I'm treading into Database territory. From here I got the info that The most efficient way to implement communication between the server and database is to set up a database connection pool. Creating a new connection for each client request can be very time-consuming, especially for applications that continuously receive a large number of requests. and the tutorial uses a JNDI datasource. My application is also similar(but I won't be using Tomcat, just sockets) and my server will be getting requests from multiple clients but I

gwt jetty jndi lookup fails

坚强是说给别人听的谎言 提交于 2019-12-05 13:49:14
I am using gwt with jetty but want use jndi for datasource so followed the documentation for eclipse gwt jetty jndi and did below to run my gwt app Run my gwt app with following options in eclipse -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl myapp.html -logLevel INFO -codeServerPort 9997 -war war\location -server com.myproject.MyCustomJettyLauncher com.my.apps.app My jetty-env.xml under WEB-INF configuration <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" " http://jetty.mortbay.org/configure.dtd">

nested exception is java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'null' - Spring MVC JNDI issue

落花浮王杯 提交于 2019-12-05 13:46:41
I am developing SpringMvcJndiDataSourceXML example. In this example I'm facing below error. I found many links but none of them worked fine for me. Although this is duplicate question, but still I'd like to get the answer to the following question. Please guide. org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'null' at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) at org.springframework.jdbc.core.JdbcTemplate

Tomcat with mysql : “ Cannot create JDBC driver of class '' for connect URL 'null' ”

半腔热情 提交于 2019-12-05 12:41:43
This question has been asked and answered multiple times but it still doesn't solve my problem. Host OS is Fedora 17 Tomcat package tomcat-7.0.27-2.fc17.noarch Here is my $CATALINA_HOME/logs/catalina.out [DEBUG]: Failed to establish connection with datastore org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371) at org.apache.tomcat.dbcp.dbcp

JNDI with Active Directory PartialResultException

百般思念 提交于 2019-12-05 11:49:11
问题 I am basically walking the LDAP tree in Active Directory. At each level I query for "(objectClass=*)" . When I do this on the root eg "dc=example,dc=com" I get the exception below. This works fine on our other LDAP instances. For some reason only on our Active Directory server I get this exception. I also get the same exception when using JXplorer on our Active Directory server. From reading around online I found people saying you should turn on following, not sure what that means... So on my

Autowire JNDI Resource in Spring

狂风中的少年 提交于 2019-12-05 11:18:49
I would like to know how to autowire JNDI resource in Spring controller using annotation. Currently I can retrieve the resource using <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="my/service"/> </bean> Is there any way, I can do the same thing using annotation? Something like @Resource(name="my/service") ? I use this configuration to inject a JNDI resource spring config <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:beans="http://www.springframework.org/schema/beans" xmlns

How does java LoginContext.login() work?

谁说我不能喝 提交于 2019-12-05 10:39:18
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: myAuth { org.jboss.security.ClientLoginModule required; }; Now, somewhere else in the code (the LoginContext auth isn't known there) I have an EJB that does a initialContext.lookup( jndiName ) and a narrow() to access a Bean on the JBoss application server. This

How to do jndi lookup of MQ connection factory defined in Websphere app Server from Spring

折月煮酒 提交于 2019-12-05 10:18:42
I am trying to connect to a MQ connection factory defined in Websphere app Server 7.0. But I couldnt find a right connectionfactory interface for the MQ to define in Spring. However when I tried to hardcode the connection details in the spring config file, I am able to connect to the Queue Manager. What is the right interface/format to use in Spring beans to load the MQ connection factory defined in Websphere appl server? Working Code <bean id="mqConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> <property name="hostName"> <value>127.0.0.1</value> </property> <property name=