Is it mandatory to provide a JNDI name for a stateless session bean using the mappedName attribute of the Stateless annotation? I thought that on deployment the server will assign a JNDI name if one is not provided based on the pkgname and the class name. I have not checked the ejb 3.x spec!
However with Weblogic 10.3 I found that you h...
Today I was presented with this exception
Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext [Root exception is java.lang.NullPointerException]
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:276)
at com.sun.enterprise.naming.impl.SerialConte...
I have created an EAR with a web project, ejb3 project and the ejb client. I'm able to call the bean methods via injection in the servlet.
I'm planning to use a ServiceDelegate which is a pojo to handle the bean invocation. So I'll call the delegate from my servlet and the delegate will call the appropriate beans and its methods.
But I'...
Is there a way to access jdbc/ jndi resource properties associated with a Datasource in BIRT?
I would like to access the properties (esp. driverClass) to modify the query associated with the datasets to address database engine specific variations.
TIA
...
I have this weird problem, web application connecting to AS400 DB2 server through JNDI, getting connection from JNDI happens to last for about 930-960 seconds!!! Usually it takes 4ms to get a connection, and from time to time it spans to 15 minutes... it has no special rule of when/why it happens. We are using JTOpen jt400.jar driver ver...
I have the java servlet that retrieves data from a mysql database. In order to minimize roundtrips to the database, it is retrieved only once in init() method, and is placed to a HashMap<> (i.e. cached in memory).
For now, this HashMap is a member of the servlet class. I need not only store this data but also update some values (counte...
Please tell me where one should use LDAP JNDI and where FileSystem JNDI. I also want to know what should be the value of Context.PROVIDER_URL in each case.
Where one can find the source file for "com.sun.jndi.ldap.LdapCtxFactory"
and
com.sun.jndi.fscontext.RefFSContextFactory (INITIAL_CONTEXT_FACTORY) classes for two.
Thanks you
...
I have generic question on using JMS provided by JBoss 5.1.
I deploy my JEE application (implemeneted using Spring Framework) on JBoss 5.1. The application is using Spring to consume messages from JMS queues (DefaultMessageListenerContainer) and also sends messages to JMS destinatiosn using Spring's JmsTemplate. What is important here i...
Hi,
I need to add a JNDI datasource from a legacy database to my Grails (1.2.2) application.
So far, the resource is added to my Tomcat (5.5) and DataSource.groovy contains:
development {
dataSource {
jndiName = "jdbc/lrc_legacy_db"
}
}
I also created some domain objects mapping the different tables to comfortably load...
This page on Spring JDBC says
The DataSourceUtils class … provides static methods to obtain connections from JNDI
However the API doc for DataSourceUtils does not include the said static methods, as far as I can see.
What am I missing?
...
I have a stateless bean with some properties:
It's a EJB3
class AddressFacade
implements AddressFacadeRemote
it's inside a ejb-jar (MyJAR.jar)
it's in a EAR (MyEAR).
My application server (Weblogic) generated this name (jndiName/mappedName):
MyEARMyJAR_jarAddressFacade_AddressFacadeRemote
I can't use injection, so I'll make a look...
Using the com.sun.jndi.fscontext.RefFSContextFactory file based JNDI context factory and it seems to only allow 1 binding file in location you specify. For example
Hashtable properties = new Hashtable(2);
properties.put(Context.PROVIDER_URL,"file:///tmp/jms/mycontext");
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscon...
I am using the com.sun.jndi.fscontext.RefFSContextFactory file based JNDI context factory. It seems to take the drive of the where the java application is started in.
Hashtable properties = new Hashtable(2);
properties.put(Context.PROVIDER_URL,"file:///tmp/jms/mycontext");
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.f...
Hi. I have application originally developed for Tomcat. There is context.xml file in META-INF using for creating datasource. As was mentioned here glassfish has support of context.xml file from Tomcat. I tried to migrate this app to Glassfishv3. But I still, my app (actually Hibernate) can't find jdbc datasource resource via jndi.
There ...
Does anybody have a good solution for managing .properties files in a web application? Currently I have to pull apart my .war file before deploying, change the entries in my .properties file, and then redeploy to change settings.
Alternatively I can ssh into the server, change the .properties file in the deploy directory and restart ...
I have a website hosted at Godaddy where I use JNDI to manage DB connections. Godaddy is using Tomcat 5.5.27 with JDK 1.5. I am also using the same versions locally.
JNDI works fine at my local development environment, but when I run it at Godaddy, I get the following exception message:
Cannot create JDBC driver of class '' for connect...
So I want to create a user account in Windows 2003 with Active Directory utilizing JNDI. I am following the following example: http://forums.sun.com/thread.jspa?threadID=582103 (first post). The following code is throwing an LDAP error I believe due to a chicken and egg problem of creating a user and then setting a password that is const...
I'm getting this error when I try to view the page:
SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
I have the following /WEB-INF/web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>WSwartzendruber.net</display-name>
<description>Personal Website</description>
<!-- Servlet st...
Preface:
Most of J2EE applications are using container managed datasources through JNDI. This is fine as it gives one place for configuring these connections.
The problem arises when we want to use ORM framework (like hibernate) or something that have to know the default schema (mostly for Oracle, may be others too), which can be differe...
Hi,
I try to setup a database connection in java with JNDI in combination with eclipseLink/JPA on Tomcat 5.5. I already configured the JNDI resource in web.xml and context.xml.
The db connection works with JNDI without using JPA and eclipseLink.
After configuring the persistence.xml for eclipseLink, I got the following exception.
I do...