Hi,
We would like to pass the same WAR thru dev, test, and production. How can we persist our JNDI settings w/o manual modification of server.xml? For example, in Websphere there is an admin console, and the JNDI resources can be added manually and saved, or using jacl/jython script out the addition of the necesary JNDI resources.
Why ...
I have a J2EE webapp which is used to upload a file which is then processed by a database procedure. Because we do not want the webapp to have to wait until the database procedure completes, it is executed in a different thread.
The process running in the separate thread needs to obtain and close its own connection. The webapps usually...
Hello, I want to be able to do something like this in a stateless Session Bean
@Resource(name="mycustomthingie") private CustomClass stuff;
The value injected is context (speak: Thread) dependant.
I guess this would be possible if I bind an ObjectFactory into the JNDI Context that delivers the correct Object when requested.
As I und...
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-c...
Hi all,
I am using Jetty 7 with JBoss Seam and have 2 Java Mail Sessions configured, one for support notifications and another for general notifications.
The problem I am having appears to be from JBoss Seam / JSF not being able to resolve the session which I set in the Event Context to the proper Java Mail Session prior to sending the...
I am using JNDI with Tomcat6 to manage Mysql connections, my Catalina/domain.com/ROOT.xml has:
<Resource name="jdbc/db" auth="Container" type="javax.sql.DataSource"
username="db1" password="somepass" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/db?autoReconnect=true" maxActive="15" maxIdle=...
I have a working persistence definition that works on java level tests. Now I want to incorporate that into a web application which defines the database connection as JNDI in the context.xml. What do I need to change to make it work with the JNDI instead of the persistence.xml or at least get the infor from there?
...
I'm using the technique described here to register string values on the JNDI tree via an XML file deployed to JBoss.
This is working fine for my system constants (URLs and the like). However I am also trying to register the contents of a file which has been encoded to a Base64 string. The file is fairly large (about 400k), so the resu...
Naming and Directory (JNDI) - What are Pitfalls for Using JNDI
...
I was wondering: how does one go about configuring WAS if they want to store some confidential information that is not datasource, JMS or Mail related? I'm looking more for an adhoc JNDI resource (a few Strings) that can be queried at runtime to get both a username and password for a vendor system I need to connect to.
Not being uber f...
I need a database connection in Java Web service implemented as a session bean, and I'm not sure if I do it right.
I created a class
public final class SQLUtils {
//.....
private static DataSource m_ds=null;
static
{
try
{
InitialContext ic = new InitialContext();
...
I have apache tomcat 5.5.28 on my windows box and I am trying to deploy a web application (WAR) which works fine on other servers.
However I am having trouble creating a datasource. I am not sure of the format. The db is oracle.
Here is what I have in server.xml.
<GlobalNamingResources>
<Environment
name="simpleValue"
...
I'm trying to run a sample program for hibernate shards.
I'm all done with it but whenever I run the test program I get an Exception
javax.naming.NoInitialContextException: Need to specify class name in environment or system property
After googling I got to know that I've to set the JNDI properties. I did like this
Hashtable env = ...
Hello,
I have a .properties file in my application which contains dataSource properties.
I set up a JNDI reference to this dataSource using the following code :
// first I create MyDataSource from the properties found in the .properties file
//then :
Context initContext = new InitialContext();
initContext.createSubcontext("jdbc");
ini...
Hello All,
My application currently relies on JDBC realm authentication. Recent needs have forced us to think about having LDAP authentication as well. We are thinking about using Active Directory for both authentication as well as authorization (roles). As a standalone test, I was able to authenticate my application with AD. But here i...
Hi,
I'm running jetty-6.1.7 and I've got an ActiveMQConnectionFactory that I'd like to reference in my spring configuration via a JNDITemplate.
My jetty.xml configuration is vanilla:
<New id="connectionFactory" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jms/connectionFactory</Arg>
<Arg>
<New class="org.apach...
Greetings,
I'm looking for a good solution for externalizing the JNDI connection pool information in context.xml of a war so that as the application moves from dev to QA to prod, the war file won't need to be recompiled. Ideally the url, driver, username and password would be variablized and then populated by means of a properties file...
How to make unit test of servlets which uses jndi for lookup of datasource (JDBC) ?
...
I have configured a foreign jndi factory to which a link was according!But I dont know how to use the foreign jndi in my own application!
could anybody do me a favor???
...
Is it possible to add a custom object (String or URL) to JNDI using Weblogic Server Administration Console (Weblogic 10.0) or by editing server's configuration file (config.xml)?
...