jndi

Configure JBOss cache to run on JBoss server 4.2.3.GA

五迷三道 提交于 2020-01-11 10:08:11
问题 Our commercial application used to run on different application server and letely we started adjust it to run on JBoss server. The problem is that that application runs JBoss cache and as part of the integration with this framework, the web-inf\lib contains the follwing jars: jboss-aop.jar, jbosscache-core.jar, jboss-common.jar, jboss-common-core.jar, jboss-j2ee.jar, jboss-jmx.jar, jboss-logging-spi.jar This causes a problem to use JNDI through the application because the jboss-common-core

SerialInitContextFactory not found in glassfish naming

这一生的挚爱 提交于 2020-01-11 06:11:31
问题 This one starts to drive me completely nuts ... I want to create a Glassfish client application using Maven. For that, I've added the requried gf-client dependency : <dependency> <groupId>org.glassfish.appclient</groupId> <artifactId>gf-client</artifactId> <version>3.1</version> <type>pom</type> <scope>compile</scope> </dependency> Then, wanting to contact my Glassfish server, running on the same application, I do the usual lookup : Properties p = new Properties(); // optional. Defaults to

Spring Boot Using Embedded Tomcat with JNDI

谁说胖子不能爱 提交于 2020-01-10 04:19:27
问题 I am using Spring Boot with Embedded Tomcat and attempting to use JNDI but getting the following error: javax.naming.NameNotFoundException: Name [jdbc/dataSource] Any tips would be greatly appreciated. Here is my code: @Configuration public class TomcatJndiConfiguration{ @Value("${database.driver}") private String driverClassName; @Value("${database.url}") private String databaseUrl; @Value("${database.username}") private String databaseUsername; @Value("${database.password}") private String

JBoss: Binding values into JNDI in JBoss EAP 6 similar to JNDIBindingServiceMgr

▼魔方 西西 提交于 2020-01-10 04:18:06
问题 How do I bind an arbitrary string to JNDI in JBoss EAP 6? I used to do it through org.jboss.naming.JNDIBindingServiceMgr MBean in previous EAP version. Is there anything similar to org.jboss.naming.JNDIBindingServiceMgr in JBoss EAP 6? We are migrating applications from jboss-5.1.EAP to jboss-eap-6.1. We need to bind some things into JNDI, so applications can look up values of environment variables. Many thanks. 回答1: You can do the following: standalone.xml: <subsystem xmlns="urn:jboss:domain

How to build and wire Spring database dependency .JAR project for use with multiple .WAR projects?

旧巷老猫 提交于 2020-01-07 03:41:10
问题 I am building a suite of web services that all access the same database but using different credentials. So to modularize the database code I am moving it out of each web app .WAR files and giving the database calls its own .JAR file. So that if WebApp1 and WebApp2 use a getAllColumnsFromTable1 MyBatis call I don't have to define the same mapper and domain object in both projects. That way I only have to change the MyBatis code in one place if Table1 ever changes, and less copy and paste

Why JNDI resource can only be called once in Tomcat?

…衆ロ難τιáo~ 提交于 2020-01-06 16:01:32
问题 When I was learning how to use JNDI resources in Tomcat 7, a customized bean factory has been made, called MyBeanFactory . It provides external resources to my web application. At the first time, we assume that it provides the current system timestamp. However, I realised that MyBeanFactory was called only once, at the first request. It seems that the java bean MyBean had be stored in Tomcat after the first execution. Then MyBean is reused by every request. No matter when I retape the URL in

Websphere JNDI lookup fails

假装没事ソ 提交于 2020-01-05 10:10:11
问题 I am getting below error when I am looking up a JNDI connection for jdbc datasource: javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:

Passing the JNDI name dynamically

。_饼干妹妹 提交于 2020-01-05 09:51:06
问题 I have a lot of Websphere servers with different JNDI name of my DB connection so I have to build many ears files for each server. I'd like to do something like this: <bean id="dbDataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="${SPECIFIC_JNDI_NAME}"/> </bean> How can I create this SPECIFIC_JNDI_NAME variable? 回答1: The proper Java EE way to do it, is using resource references in your code like: java:comp/env/jdbc/myDSRef , then this resource

Can't get jetty to read jetty-env.xml

不打扰是莪最后的温柔 提交于 2020-01-05 08:13:17
问题 I have the following: Startup code: Server server = new Server(8080); WebAppContext context = new WebAppContext(); context.setDescriptor("/WEB-INF/web.xml"); context.setResourceBase("/home/webapp); context.setContextPath("/"); context.setParentLoaderPriority(true); server.setHandler(context); server.start(); jetty-env.xml in /home/webapp/WEB-INF: <?xml version="1.0"?> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <New id="properties" class="org.mortbay.jetty.plus.naming.EnvEntry"

WSO2 AS JDNI lookup

谁说我不能喝 提交于 2020-01-05 05:50:53
问题 In WSO2 AS 5.0.1 I deploy a webapp which should use a datasource. I can configure the datasource in tomcat-server.xml or any other place in the WAR, but is it possible to use a datasource that is configured in the Carbon Management Console through JNDI? Steps taken: Configure datasource in Management Console, export it as JNDI as jdbc/platform ResourceLink in META-INF/context.xml to link the global resource: < ResourceLink name="jdbc/platform" global="jdbc/platform" type="javax.sql.DataSource