jndi

How to setup MariaDB JNDI on Wildfly 10?

 ̄綄美尐妖づ 提交于 2019-12-07 17:04:05
问题 I'm trying to move my Tomcat web service to Wildfly 10. I thought it should be drag and drop into Wildfly's deployment folder and everything should be fine, but it seems not like that. This is my MariaDB datasource definition in standalone.xml : <datasource jndi-name="java:jboss/MariaDBDS" pool-name="MariaDBDS"> <connection-url>jdbc:mariadb://db_ip/db_name</connection-url> <driver>mariadb</driver> <security> <user-name>dbAcc</user-name> <password>dbPassword</password> </security> <validation>

Can't lookup OSGI services through JNDI

会有一股神秘感。 提交于 2019-12-07 16:59:00
问题 I'm working with JBossAS7. My application has some OSGI modules and big non-OSGI part. I tried lookup osgi services in non-osgi subsystem through JNDI but they are not present in JNDI context. I found similar problem at JBOSS 7 - Osgi Bundles not present in JNDI TREE but I dont found any solution there. If JBoss team didn't implement this functionality yet, how can I resolve this problem now? I tried adding my service to JNDI context manually but got an exception because JNDI context is read

JSP/Servlet design question - Make request/response globally available via JNDI

元气小坏坏 提交于 2019-12-07 14:24:53
问题 In PHP one is always able to access the current request or response from any part of their code. This concept is fundamental to PHP programming. Request data, response data, session data (etc) are always there ! This does not happen in Java Servlets! In order to have access to the HttpServletRequest, HttpServletResponse, HttpSession (etc) in your code you need to pass them around as function variables. This means that you cannot code a web framework that inherently "knows" about all these and

JBoss 7 jndi names of ejb's package in war

对着背影说爱祢 提交于 2019-12-07 13:00:05
问题 Does anyone know how to modify the "module" component of the global jndi names for ejb's deployed in a war under JBoss 7.2 (EAP 6.1)? Per spec, the module name is the same as the base war name, which in my case includes a version number. Here is the spec from oracle: java:global/[<application-name>]/<module-name>/<bean-name> In my case it yeilds: java:/global/mywar-1.0/MyService What I would like is: java:/global/mywar/MyService I know I can modify the name of the war prior to deployment, but

Using JNDI for Database connections

两盒软妹~` 提交于 2019-12-07 11:33:40
问题 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

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

时光怂恿深爱的人放手 提交于 2019-12-07 11:00:45
问题 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

Adding datasource programmatically to JNDI context in embedded tomcat 7

孤者浪人 提交于 2019-12-07 10:36:22
问题 I'm trying to register a new datasource before the server starts but on lookup execution I'm getting javax.naming.NameNotFoundException: Name [jdbc/db] is not bound in this Context. Unable to find [jdbc]. This is how I start tomcat: Tomcat tomcat = new Tomcat(); //... ContextResource resource = new ContextResource(); resource.setName("jdbc/db"); resource.setAuth("Container"); resource.setType("javax.sql.DataSource"); resource.setScope("Sharable"); resource.setProperty("driverClassName", "org

NameNotFoundException Jetty 9 JNDI lookup

我的梦境 提交于 2019-12-07 10:05:54
问题 I need to implement JNDI for Jetty 9.0.3 web server for H2 database using C3p0 connection pooling, I've placed both H2 and C3p0 jars in lib/ext of JETTY-HOME directory and I've created a jetty-env.xml file in my WEB-INF. WEB-INF/jetty-env.xml <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <New id="DSTest" class="org.eclipse.jetty.plus.jndi.Resource

gwt jetty jndi lookup fails

拟墨画扇 提交于 2019-12-07 09:42:43
问题 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

could not load class persistentBag

巧了我就是萌 提交于 2019-12-07 09:12:31
I have a class below and I load this object from the DB but when I call this method through with JNDI address, give some error about kullainiciGrups attribute which is a java.util.List , if this attribute removed, it works without exception. Stack trace is below the code block; What do you think about this persistenceBag exception? Thanks. package enlil.domain; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id;