JNDI DataSources
I configured Jakarta-Tomcat-4.1.27 to supply connections of my Oracle Database Server through JNDI Datasource as described in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html All accomplished the tests of JNDI Datasource HOW-TO and everything perfectly worked. Later, reading a magazine of ORACLE finds an article on Six JDBC Tips goes Enterprise Web Application (Setember/October 2002), more specifically with an example on Datasources according to code below: ... Context ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/pequi"); conn = ds.getConnection("CELIN","1951174"); conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE); ... My question is if I can pass the user and connection password to the servant of database in the way that is being done above, because in all of the examples of JNDI Datasource HOW-TO user's name and the password are so much defined in server.xml, together with the configuration. When executing the code I am receiving the error message java.lang.UnsupportedOperationException at datasource.OracleDataSource.conecta_datasource(OracleDataSource.java:18) The line 18 of the code is exactly the same in that step the user and the respective password. Thank you SebastiĆ£o Carlos Santos Oracle Database Administrator - DBA 8i/9i Oracle Certified Professional - OCP DBA 8i/9i
JNDI DataSources
I want to use one JDBC connection pool in my tomcat (4.1) instance for all contexts; therefore I configure the DataSource in . In each context I put a so I can obtain the DataSource in my applications. But now I have the problem that I had to execute some SQL statements (e.g. a "set role" statement or some calls to stored procedures...) on the connection before it will passed to the application. This statements are different from context to context. My current solution is: I wrote a resource factory class, which is configured in every context. It does a JDNI lookup to the global connection pool, gets the DataSource and put it in a wrapper class, which exectures the SQL statetments before getConnection() deliveres the connection to the application. The SQL statements a read in before as resource parameters. This works fine except that global connection pool must be declared in the context with . So the application can also use this DataSource. I want to prohibit that the application can use the original DataSource! Is there a way to use a global resource only in a (context local) resource factory class and prohibit the application to use this global resource? Or do you have a better solution to solve this problem? Thanks, Gernot - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
War Development w/ JNDI Datasources
Hi All, We are currently developing an application and using CVS to manage our source code. Our goal is to be able to pull down the project off of CVS and with a single Ant target, get the application up and running on a local install of Tomcat. The problem that has risen is that our DataSources are specified in JNDI (the server.xml in the {CATALINA_HOME}/conf) and is not something that we can feasibly park in CVS. Is there a way to get the DataSources specified without modifying the server.xml? Or, should we be making an ANT target that loads a second instance of tomcat using a project specific server.xml, much like what Cactus describes? Many Thanks, Jacob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War Development w/ JNDI Datasources
Howdy, One idea that leaps to mind is to have ant tokens in your server.xml and values for those tokens in your build.properties file. Have ant copy the master server.xml to your local install and fill in the tokens for your JNDI datasources. The cactus approach is similar to this and not too bad either. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Hookom, Jacob [mailto:[EMAIL PROTECTED] >Sent: Monday, August 18, 2003 9:47 AM >To: [EMAIL PROTECTED] >Subject: War Development w/ JNDI Datasources > >Hi All, > >We are currently developing an application and using CVS to manage our >source code. Our goal is to be able to pull down the project off of CVS >and >with a single Ant target, get the application up and running on a local >install of Tomcat. > >The problem that has risen is that our DataSources are specified in JNDI >(the server.xml in the {CATALINA_HOME}/conf) and is not something that we >can feasibly park in CVS. > >Is there a way to get the DataSources specified without modifying the >server.xml? Or, should we be making an ANT target that loads a second >instance of tomcat using a project specific server.xml, much like what >Cactus describes? > >Many Thanks, >Jacob > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War Development w/ JNDI Datasources
You can always specify it in a separate context configuration file. Keep the server.xml generic and put application specifics in context configuration files. Jake At 08:47 AM 8/18/2003 -0500, you wrote: Hi All, We are currently developing an application and using CVS to manage our source code. Our goal is to be able to pull down the project off of CVS and with a single Ant target, get the application up and running on a local install of Tomcat. The problem that has risen is that our DataSources are specified in JNDI (the server.xml in the {CATALINA_HOME}/conf) and is not something that we can feasibly park in CVS. Is there a way to get the DataSources specified without modifying the server.xml? Or, should we be making an ANT target that loads a second instance of tomcat using a project specific server.xml, much like what Cactus describes? Many Thanks, Jacob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War Development w/ JNDI Datasources
Which file is this? I'd like to read up on it "put application specifics in context configuration files." Russ -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 10:40 AM To: Tomcat Users List Subject: Re: War Development w/ JNDI Datasources You can always specify it in a separate context configuration file. Keep the server.xml generic and put application specifics in context configuration files. Jake At 08:47 AM 8/18/2003 -0500, you wrote: >Hi All, > >We are currently developing an application and using CVS to manage our >source code. Our goal is to be able to pull down the project off of >CVS and with a single Ant target, get the application up and running on >a local install of Tomcat. > >The problem that has risen is that our DataSources are specified in >JNDI (the server.xml in the {CATALINA_HOME}/conf) and is not something >that we can feasibly park in CVS. > >Is there a way to get the DataSources specified without modifying the >server.xml? Or, should we be making an ANT target that loads a second >instance of tomcat using a project specific server.xml, much like what >Cactus describes? > >Many Thanks, >Jacob > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War Development w/ JNDI Datasources
Howdy, If you're packing a war, it's META-INF/context.xml. Or you can put .xml in $CATALINA_HOME/webapps as the manager and admin webapps do. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Pitre, Russell [mailto:[EMAIL PROTECTED] >Sent: Monday, August 18, 2003 12:47 PM >To: Tomcat Users List >Subject: RE: War Development w/ JNDI Datasources > >Which file is this? I'd like to read up on it > >"put application specifics in context configuration files." > > > >Russ > > > >-Original Message- >From: Jacob Kjome [mailto:[EMAIL PROTECTED] >Sent: Monday, August 18, 2003 10:40 AM >To: Tomcat Users List >Subject: Re: War Development w/ JNDI Datasources > > > >You can always specify it in a separate context configuration file. >Keep >the server.xml generic and put application specifics in context >configuration files. > >Jake > >At 08:47 AM 8/18/2003 -0500, you wrote: >>Hi All, >> >>We are currently developing an application and using CVS to manage our >>source code. Our goal is to be able to pull down the project off of >>CVS and with a single Ant target, get the application up and running on > >>a local install of Tomcat. >> >>The problem that has risen is that our DataSources are specified in >>JNDI (the server.xml in the {CATALINA_HOME}/conf) and is not something >>that we can feasibly park in CVS. >> >>Is there a way to get the DataSources specified without modifying the >>server.xml? Or, should we be making an ANT target that loads a second >>instance of tomcat using a project specific server.xml, much like what >>Cactus describes? >> >>Many Thanks, >>Jacob >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War Development w/ JNDI Datasources
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html Anything in can go in a file outside server.xml, in the Host's appBase. Tomcat will pick it up automatically. You name the file app.xml, so if your webapp is myApp, you would put a file called myApp.xml in the Host's appBase, and the contents of that file would be the Context element. The admin and manager Contexts/apps use this method, so every Tomcat install has an example. John Pitre, Russell wrote: Which file is this? I'd like to read up on it "put application specifics in context configuration files." Russ -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 10:40 AM To: Tomcat Users List Subject: Re: War Development w/ JNDI Datasources You can always specify it in a separate context configuration file. Keep the server.xml generic and put application specifics in context configuration files. Jake At 08:47 AM 8/18/2003 -0500, you wrote: Hi All, We are currently developing an application and using CVS to manage our source code. Our goal is to be able to pull down the project off of CVS and with a single Ant target, get the application up and running on a local install of Tomcat. The problem that has risen is that our DataSources are specified in JNDI (the server.xml in the {CATALINA_HOME}/conf) and is not something that we can feasibly park in CVS. Is there a way to get the DataSources specified without modifying the server.xml? Or, should we be making an ANT target that loads a second instance of tomcat using a project specific server.xml, much like what Cactus describes? Many Thanks, Jacob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War Development w/ JNDI Datasources
Ah cool.didn't realize that.nicethats good to know. Thanx Guys -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 12:50 PM To: Tomcat Users List Subject: Re: War Development w/ JNDI Datasources http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html Anything in can go in a file outside server.xml, in the Host's appBase. Tomcat will pick it up automatically. You name the file app.xml, so if your webapp is myApp, you would put a file called myApp.xml in the Host's appBase, and the contents of that file would be the Context element. The admin and manager Contexts/apps use this method, so every Tomcat install has an example. John Pitre, Russell wrote: > Which file is this? I'd like to read up on it > > "put application specifics in context configuration files." > > > > Russ > > > > -Original Message- > From: Jacob Kjome [mailto:[EMAIL PROTECTED] > Sent: Monday, August 18, 2003 10:40 AM > To: Tomcat Users List > Subject: Re: War Development w/ JNDI Datasources > > > > You can always specify it in a separate context configuration file. > Keep the server.xml generic and put application specifics in context > configuration files. > > Jake > > At 08:47 AM 8/18/2003 -0500, you wrote: > >>Hi All, >> >>We are currently developing an application and using CVS to manage our >>source code. Our goal is to be able to pull down the project off of >>CVS and with a single Ant target, get the application up and running on > > >>a local install of Tomcat. >> >>The problem that has risen is that our DataSources are specified in >>JNDI (the server.xml in the {CATALINA_HOME}/conf) and is not something >>that we can feasibly park in CVS. >> >>Is there a way to get the DataSources specified without modifying the >>server.xml? Or, should we be making an ANT target that loads a second >>instance of tomcat using a project specific server.xml, much like what >>Cactus describes? >> >>Many Thanks, >>Jacob >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
parsing the jndi datasources source code
hi all, I'm looking for the source code/class where the configured jndi datasources are parsed and registred. I'm using Tomcat 4.18 and dbcp I need to understand two features. 1) how a resource is registred in JNDI. 2)how a datasource is instanciated and registred as a jndi resource. thanks in advance. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] L'integrite de ce message n'etant pas assuree sur internet, Natexis Banques Populaires ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. The integrity of this message cannot be guaranteed on the Internet. Natexis Banques Populaires can not therefore be considered responsible for the contents.Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender.