jndi

Configuring a JNDI resource SQL in Jetty

安稳与你 提交于 2021-02-18 13:35:31
问题 I am having a lot of difficulty configuring a JNDI Resource in Jetty. I've gotten this to work in a Tomcat easily using context.xml and the Resource node. Attempts have been made to specify the resource in Jetty in both the jetty-env.xml and their version of a context.xml file but I end up getting the same exception. Here is the context.xml version of the resource definition: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse

Configuring a JNDI resource SQL in Jetty

可紊 提交于 2021-02-18 13:34:54
问题 I am having a lot of difficulty configuring a JNDI Resource in Jetty. I've gotten this to work in a Tomcat easily using context.xml and the Resource node. Attempts have been made to specify the resource in Jetty in both the jetty-env.xml and their version of a context.xml file but I end up getting the same exception. Here is the context.xml version of the resource definition: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse

Java - Tomcat: Reload context.xml without restarting server

泪湿孤枕 提交于 2021-02-11 15:19:28
问题 I'm using spring mvc and tomcat as a server. I want to be able to change a jndi field that is Autowired(as String): <jee:jndi-lookup id="someMessage" jndi-name="someMessage"/> in one of the my services, that is referenced to conf/context.xml of Tomcat, that looks something like this: <Environment name="someMessage" value="Change this." type="java.lang.String" />. However, when I change the value on context.xml, this change is not reflected on my service managed by spring, unless I restart

Connect JMS queue using JNDI with Spring Boot

人走茶凉 提交于 2021-02-06 13:48:22
问题 I had a hard time figuring out how to implement a Spring Boot JMS Listener, listening to an ActiveMQ queue within a JBoss application server. Therefore I choose to post a question and answer it with my final solution, hoping it could save some of you a few hours. 回答1: ActiveMQ is supported by Spring Boot autoconfiguration, but since it was inside the JBoss server Spring Boot was failing to connect ActiveMQ. In fact you need to define connectionFactory and jmsListenerContainerFactory beans

Connect JMS queue using JNDI with Spring Boot

微笑、不失礼 提交于 2021-02-06 13:48:05
问题 I had a hard time figuring out how to implement a Spring Boot JMS Listener, listening to an ActiveMQ queue within a JBoss application server. Therefore I choose to post a question and answer it with my final solution, hoping it could save some of you a few hours. 回答1: ActiveMQ is supported by Spring Boot autoconfiguration, but since it was inside the JBoss server Spring Boot was failing to connect ActiveMQ. In fact you need to define connectionFactory and jmsListenerContainerFactory beans

Configuring two datasources by jndi lookup with Springboot

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-28 11:11:01
问题 I have a small web app built with Spring Boot that has two datasources, (one for the application data, and one for retrieving user access information). I have configured this successfully using a config class for each datasource and using datasource connection details in the application.properties file. I am now trying to refactor this to use jndi lookup for the datasource details so that I can use the same approach locally as I'll use in dev/test and prod. I have amended my database config

Unable to lookup resource on component level in Websphere

烂漫一生 提交于 2021-01-28 07:32:01
问题 At the moment I'm working on an application that has to use a connection factory. When I lookup the connection factory directly on a global level by the name set in WAS everything is working fine, but for means of decoupling I want to define a resource reference in my application and lookup that name. So I created following entry in my application.xml: <resource-ref> <res-ref-name>jms/connectionFactory</res-ref-name> <res-type>javax.jms.ConnectionFactory</res-type> <res-auth>Container</res

Context is read only

假装没事ソ 提交于 2021-01-02 06:49:16
问题 Helo masters, I have to create a JNDI Datasource dynamically, I tried to do it with a listener called SetupApplicationListener. Here is the beginning of WEB-LIB/web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee"> <display-name>pri-web</display-name> <!-- Listeners --> <listener> <listener-class>org.apache.myfaces.webapp

Context is read only

假装没事ソ 提交于 2021-01-02 06:49:13
问题 Helo masters, I have to create a JNDI Datasource dynamically, I tried to do it with a listener called SetupApplicationListener. Here is the beginning of WEB-LIB/web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee"> <display-name>pri-web</display-name> <!-- Listeners --> <listener> <listener-class>org.apache.myfaces.webapp