jndi

Can't lookup OSGI services through JNDI

北城余情 提交于 2019-12-06 05:01:08
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 only(according to https://issues.jboss.org/browse/AS7-421 ) It's not fully integrated yet (monitor

Tomcat 6/7 JNDI with multiple datasources

故事扮演 提交于 2019-12-06 04:37:46
问题 When there are more than one <Resource> elements in context.xml and more than one <resource-ref> elements in web.xml, my application begins to throw TNS:no appropriate service handler found and ORA-01017: invalid username/password; logon denied However, if there is only one of the data sources in JNDI, meaning the other one use regular JDBC data source, the application runs like a charm Both data sources come from same db URL but use different schema. My guess is that it may be caused by the

I don't understand @Resource mappedName element at all

人盡茶涼 提交于 2019-12-06 04:37:23
问题 I've read both and I don't understand them, can someone give an example and explain it in plain english please ? mainly what's the difference between it and the "name" element/ From Oracle tutorial The mappedName element is a non-portable, implementation-specific name that the resource should be mapped to. Because the name element, when specified or defaulted, is local only to the application, many Java EE servers provide a way of referring to resources across the application server. This is

Java EJB JNDI Beans Lookup Failed

感情迁移 提交于 2019-12-06 04:35:45
I have the following structure in place: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.screening</groupId> <artifactId>screening</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <name>Screening Java Parent</name> <modules> <module>Module1</module> <module>Module2</module> </modules> <dependencies> <!-- multiple dependency here --> <dependencies> <build> <plugins>

Weblogic could not find resource adapter with “correct” JNDI name for binding

十年热恋 提交于 2019-12-06 03:11:08
问题 I am trying to bind my message driven bean with Oracle JCA file adapter (which is included in the SOA suite) on Weblogic 10.3.5. So that my MDB can get notified when there is any .txt file is moved to specific directory. After launching a Weblogic domain with SOA features supported, the file adapter is automatically deployed. On Weblogic console I can see the file adapter is deployed as a "Resource Adapter", health is "OK", state is "Active", as shown below: Also I run the tests of the file

How to show all objectclasses description of ldap directory using jndi

北城以北 提交于 2019-12-06 02:35:08
问题 I want to show all objectclasses present in schema of LDAP Directory to help user to input available objectclasses for adding new entry. DirContext schema = ctx.getSchema(""); Attributes answer = schema.getAttributes("ClassDefinition/person"); but that shows information about person only. 回答1: You have to query the subschema subentry i.e cn=schema (the below code has been tested against the Apache Directory Server) DirContext ctx = new InitialLdapContext( env, null ); SearchControls

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

陌路散爱 提交于 2019-12-06 02:32:47
问题 Hi When I try to connect to the datasource using JNDI, I am getting this error: [org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.apache.roller.weblogger

How to setup JNDI lookup in a Spring-JUnit test?

烂漫一生 提交于 2019-12-06 01:57:18
问题 I'm using Maven 3.0.3, Spring 3.1.0.RELEASE, and JUnit 4.8.1. How do I create JNDI functionality outside the container (which in my case would be JBoss)? I thought Spring's jndiTemplate would do the trick (from my testApplicationContext.xml file): <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate" lazy-init="true"> <property name="environment"> <props> <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop> <prop key="java.naming.provider.url"

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

醉酒当歌 提交于 2019-12-06 01:31:52
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 removes the complexity of passing them around. So, I have devised this solution: Create anf register a

JNDI configuration/lookup in Glassfish

。_饼干妹妹 提交于 2019-12-06 01:07:56
问题 I'm having trouble getting some basic JNDI configuration going in Glassfish. I have what I think ought to be a simple task: at run time, determine if a particular property is set to true or not. I think this is a good application of JNDI, but can't seem to get the path correct between the app server and my servlet code. Here's how I have configured the property in Glassfish: In my servlet code, I'm trying to look up the value with: Boolean enabled = (Boolean) ctx.lookup("java:global/arizona