jndi

Adding custom object to JNDI on Weblogic 10

南楼画角 提交于 2019-12-20 09:47:12
问题 Is it possible to add a custom object (String or URL) to JNDI using Weblogic Server Administration Console (Weblogic 10.0) or by editing server's configuration file (config.xml)? 回答1: I don't think so. Quoting Load objects in the JNDI tree: Using the Administration Console, you can load WebLogic Server J2EE services and components, such as RMI, JMS, EJBs, and JDBC Data Sources, in the JNDI tree. And indeed, I couldn't find a way to add a String or URL using the console. AFAIK, the standard

How to get resource from the context.xml file in tomcat webapp?

烂漫一生 提交于 2019-12-20 09:05:05
问题 This is my context.xml file: ... <Resource auth="Container" driverClass="net.sourceforge.jtds.jdbc.Driver" type="com.jolbox.bonecp.BoneCPDataSource" idleMaxAge="240" idleConnectionTestPeriod="60" partitionCount="3" acquireIncrement="1" maxConnectionsPerPartition="10" minConnectionsPerPartition="3" statementsCacheSize="50" releaseHelperThreads="4" name="jdbc/MyDatasource" username="my_username" password="my_password" factory="org.apache.naming.factory.BeanFactory" jdbcUrl="jdbc:jtds:sqlserver:

How to configure jndi DataSource in Tomcat 7

随声附和 提交于 2019-12-20 07:57:07
问题 I need to deploy our web application in tomcat 7.but my application use JNDI data source. how to create jndi DataSource in Tomcat 7 回答1: Have you tried the Tomcat Manual: http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html (Hint: Google String was "jndi datasource tomcat 7") 回答2: I can show how I do it in Tomcat 9. This may or may not work in Tomcat 7. FYI, Tomcat 7 seems to be in maintenance-mode. In my situation, I want to store settings such as database access info

Datasource in jdbc connection pooling not returning connection [duplicate]

眉间皱痕 提交于 2019-12-20 06:23:43
问题 This question already has answers here : Is it safe to use a static java.sql.Connection instance in a multithreaded system? (2 answers) Closed 11 months ago . I have a jsp web application. I'm using jdbc connection pooling to use mysql database located at the server side. My web application hangs sometimes, when i checked debugging i found that it hangs at ds.getConnection(); It does not return any exception/error. Browser will be simply in loading state. I have included my DBConnection class

How to access JNDI data source defined in weblogic 10.3.6

自作多情 提交于 2019-12-19 16:18:11
问题 I have created a JNDI data-source using my weblogic console but I am not able to access the object from my web application. Below are the details In weblogic 10.3.6, I have given the JNDI name for datasource as : jdbc/mydb To get DB connection from my web application I have written this code in my web application: Context initContext = new InitialContext(); DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/mydb"); jndiConnection = ds.getConnection(); Earlier I was using

problem configure JBoss to work with JNDI

风格不统一 提交于 2019-12-19 09:56:06
问题 I am trying to bind connection to the DB using JNDI in my application that runs on JBoss. I did the following: I created the datasource file oracle-ds.xml filled it with the relevant xml elements: <datasources> <local-tx-datasource> <jndi-name>bilby</jndi-name> ... </local-tx-datasource> </datasources> and put it in the folder \server\default\deploy Added the relevant oracle jar file than in my application I performed: JndiObjectFactoryBean factory = new JndiObjectFactoryBean(); factory

Tomcat 8, axis2 webservices aar, spring jndi not bound in context

会有一股神秘感。 提交于 2019-12-19 04:21:59
问题 I have been working on an issue where JNDI name is not found in the context an axis2 webservice is running. This issue is only in Tomcat 8 when I use spring. Some details: (I will provide the elements that are relevant) 1. services.xml <service name="ScoreService" class="com.bpl.ws.service.ScoreServiceInitializer"> <description>Simple test service</description> <parameter name="ServiceObjectSupplier" locked="false">org.apache.axis2.extensions.spring.receivers

HTTP 500 - Cannot create JDBC driver of class '' for connect URL 'null'

我的梦境 提交于 2019-12-19 04:14:13
问题 I have been searching to fix that problem for 3 days reading forums... Then I decided to ask for some help. Nedless to say that your help would be highly appreciated :-) I created a jndi resource for the mysql connexion in Tomcat context.xml instance in Eclipse My web app works fine when I start the server from eclipse. It doesn't work fine when I start the web app from eclipse 'Run configurations' with that goals : clean tomcat7:run. My aim is to delegate the build, deploy, start server to

Using ActiveMQ via JNDI

一个人想着一个人 提交于 2019-12-18 16:49:51
问题 I'm trying to create simply connect with ActiveMQ using JNDI. I have Queue named 'example.A'. According ActiveMQ documentation touching JNDI, if I want to use ConectionFactories and Queues (Topics) via JNDI, I have to place jndi.properties file on my classpath. As I have understood, activeMQ classpath is %activemq%/conf directory by default. I have not changed it. So I have this property for my queue: queue.MyQueue = example.A I have created java client class for ActiveMQ which uses JNDI as

What to put into jta-data-source of persistence.xml?

◇◆丶佛笑我妖孽 提交于 2019-12-18 11:41:20
问题 What value should I place into <jta-data-source> of my persistence.xml ? In glassfish admin panel I created a datasource name "abcDS" . In my jndi.properties (inside src/test/resources ) I defined it like this: [...] abcDS=new://Resource?type=DataSource abcDS.JdbcDriver=org.hsqldb.jdbcDriver abcDS.JdbcUrl=jdbc:hsqldb:mem:testdb abcDS.JtaManaged=true [...] What shall I place into persistence.xml ? I've found a lot of variants in the Net, like: "jdbc/abcDS" , "java:/abcDS" , "abcDS" . Which one