jndi

Get DNS SRV record using JNDI

亡梦爱人 提交于 2019-12-23 17:00:44
问题 I am trying to get SRV records from a DNS server using JNDI. Hashtable<String, String> env = new Hashtable<String, String>(); env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory"); env.put("java.naming.provider.url", "dns://dns.server.com"); DirContext ctx = new InitialDirContext(env); Attributes attributes = ctx.getAttributes("_sip._udp", new String [] { "SRV" }); return attributes; But when trying to get attributes I get the following exception DNS error [Root

Installing a JNDI datasource for Oracle 11g in Tomcat

白昼怎懂夜的黑 提交于 2019-12-23 15:41:08
问题 I'm on Windows XP, using Tomcat 6 ( I can't upgrade to 7 until the end of the month ). I've been trying to implement a JNDI database resource to Oracle 11g without success. A number of other applications on my computer connect just fine with the same database credentials. I made a test JSP using straight up JDBC and put it into Tomcat. It connects just fine too. I modified a section of my conf/server.xml like this: <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html --

Spring Boot JNDI resource-ref

不打扰是莪最后的温柔 提交于 2019-12-23 12:35:01
问题 I need to declare a resource-ref in a Spring Boot application that will be deployed as war file. This is needed in order to access the database. In traditional webapps, this is added to the web.xml. How can I achieve this in a Spring Boot way? Thanks, Benjamin 回答1: We got that resolved a while back, so I thought, I'd post this here. src/main/webapp/WEB-INF/web.xml <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http:

How do I set up a mock queue using mockrunner to test an xml filter?

橙三吉。 提交于 2019-12-23 12:17:24
问题 I'm using the mockrunner package from http://mockrunner.sourceforge.net/ to set up a mock queue for JUnit testing an XML filter which operates like this: sets recognized properties for an ftp server to put and get xml input and a jms queue server that keeps track of jobs. Remotely there waits a server that actually parses the xml once a queue message is received. creates a remote directory using ftp and starts a queue connection using mqconnectionfactory to the given address of the queue

How to configure Java Message Driven Beans and Websphere Activation specification without hardcoded JNDI Names?

瘦欲@ 提交于 2019-12-23 11:13:11
问题 We have a MDB listening to a Queue reading data and sending data to another Queue @MessageDriven( activationConfig = { @ActivationConfigProperty( propertyName = "destinationType", propertyValue = "javax.jms.Queue" ) }, mappedName = "jms/dataQ") public class DataMDB implements MessageListener { @Resource(name="jms/dataQueueConnectionFactory") private ConnectionFactory connectionfactory; @Resource(name="jms/dataDestinationQ") private Destination destination; ... } and an XML (ibm-ejb-jar-bnd

Same stateless bean in two ears

无人久伴 提交于 2019-12-23 06:07:33
问题 I have the same EJB module with a bean inside an EAR that is server side and an EAR that is the client side. Can I have this situation? Because I'm getting this error http://justpaste.it/gfs3 without understand how to fix it. 回答1: You have answer in the stack trace: The short-form default binding 'com.demo.view.RitornaPersonaRemote' is ambiguous because multiple beans implement the interface : [RitornaPersonaSenzaClientEAR#RitornaPersonaSenzaClient.jar#RitornaPersona,

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

痞子三分冷 提交于 2019-12-23 05:45:09
问题 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 LdapContextSource getLdapContextSource(final String url, final String base) throws Exception { LdapContextSource ldapContextSource = new LdapContextSource(); ldapContextSource

TomEE on eclipse, How to call a remote EJB from a JSF Managed bean?

我的未来我决定 提交于 2019-12-23 05:25:30
问题 I want to have JSF 2.0 page in one instance of TomEE server calling a Remote EJB running under a different TomEE server, (both obviously running on different ports). This is what I have done in eclipse... AppEJB - is a EJB project that contains all the ejb code. AppEJBInterfaces - This project contains all the remote interfaces, the idea is that this jar will be added to the class path of the web application project containing JSF front end. AppWeb - is the Dynamic Web Application project

Spring 3 JNDI look up in glassfish3

守給你的承諾、 提交于 2019-12-23 03:47:06
问题 I want to look up some properties from JNDI configured in glassfish v3 server. I want to do it using spring. Here is my spring configuration: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework

Cannot create JDBC driver of class '' for connect URL 'null

非 Y 不嫁゛ 提交于 2019-12-23 03:04:48
问题 I am trying to configure JTA Transactions with Atomkios in Tomcat 5.5 for jndi support I am using spring,jpa+hybernate when i m trying to access my database, i am getting the error like this org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java