Re: Datasource Question - is there a way to setup a JDBC log file?
Bill, I do just that, i.e. open the log file for writing in the init() method of a dumb servlet that gets preloaded at startup. I pick up the path/filename of the log file from a context-param which I set in web.xml (and override in orion-web.xml if necessary). A better way to do all this would be to use log4j, but I haven't had a chance to look into it in any depth. Hope this helps, Attila - Original Message - From: "Bill Clinton" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Friday, July 20, 2001 6:50 AM Subject: Re: Datasource Question - is there a way to setup a JDBC log file? > Attila, > Thanks alot. I believe this is what I need, but I am going to > trouble you with one more question: Where would you recommend doing > this in a web application? I was hoping that there would be somewhere > to set a log file in the definition of the datasource. I assume I only > need to set the logWriter once, so could I do it in the init method of a > dumb servlet that gets preloaded? Or is there a better time and place to > set the logWriter? > > Thanks again for your response > Bill > > Attila Bodis wrote: > > > Bill, > > > > // Use JNDI lookup to locate the data source: > > InitialContext ctx = new InitialContext(System.getProperties()); > > DataSource ds = (DataSource)ctx.lookup(dsName); > > > > // Have the connection pool log to the specified log file: > > ds.setLogWriter(myPrintWriter); > > > > Where dsName is the name of your datasource (as specified in > > data-sources.xml) and myPrintWriter is a java.io.PrintWriter object which > > writes to the log file of your choice. > > > > Hope this helps, > > > > Attila > > > > > > - Original Message - > > From: "Bill Clinton" <[EMAIL PROTECTED]> > > To: "Orion-Interest" <[EMAIL PROTECTED]> > > Sent: Wednesday, July 18, 2001 4:37 PM > > Subject: Datasource Question - is there a way to setup a JDBC log file? > > > > > > > >> Hello, > >>I am curious on how to set up logging for JDBC. I thought there > >> would be a parameter in the data-source definition that would allow > >> logging. Does this exist? > >> > >> Bill > >> > >> btw: I am using oracle > >> > >> > >> > > >
Re: Datasource Question - is there a way to setup a JDBC log file?
Bill, // Use JNDI lookup to locate the data source: InitialContext ctx = new InitialContext(System.getProperties()); DataSource ds = (DataSource)ctx.lookup(dsName); // Have the connection pool log to the specified log file: ds.setLogWriter(myPrintWriter); Where dsName is the name of your datasource (as specified in data-sources.xml) and myPrintWriter is a java.io.PrintWriter object which writes to the log file of your choice. Hope this helps, Attila - Original Message - From: "Bill Clinton" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, July 18, 2001 4:37 PM Subject: Datasource Question - is there a way to setup a JDBC log file? > Hello, >I am curious on how to set up logging for JDBC. I thought there > would be a parameter in the data-source definition that would allow > logging. Does this exist? > > Bill > > btw: I am using oracle > > >
Re: Deployment to multiple instances...?
Andre, Thanks a lot, I should have known it was an RTFM question... Sorry! The child element inside the element is exactly what I need. Thanks again, Attila - Original Message - From: "Andre Vanha" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, May 17, 2001 3:53 PM Subject: RE: Deployment to multiple instances...? > Atilla, > Take a look at the orion-web.xml. It should be possible to provide override > values using orion specific tags. Since the Orion-web.xml is not rewritten > when a new version of the web file is deployed, once you set the file up, > you should be good to go. > > Andre > > orion-web.xml reference: > http://www.orionserver.com/docs/orion-web.xml.html > > -Original Message- > From: Reid Hartenbower [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 17, 2001 2:19 PM > To: Orion-Interest > Subject: Re: Deployment to multiple instances...? > > > This might not be the solution you're looking for, but you could use ant and > specifiy your different deployments as different targets. This would at > least give you a central place to build from, and because ant knows about > .war packaging and supports FTP, theoretically (because I have not done this > myself) you can do all you're looking for with build scripts. > > - Original Message - > From: "Attila Bodis" <[EMAIL PROTECTED]> > To: "Orion-Interest" <[EMAIL PROTECTED]> > Sent: Thursday, May 17, 2001 10:57 AM > Subject: Deployment to multiple instances...? > > > > Hi, > > > > This is a newbie question, I guess... Here is the situation: > > > > I have a web application (a bunch of servlets, JSPs, and supporting > classes) > > I want to deploy to multiple Orion instances. Some of these instances are > > for QA, some are inside the firewall, and some are outside the firewall. > My > > application has external dependencies on databases and files in the > > filesystem that are not part of the application itself. Rather than > > hard-code these values, I include them as s in > > WEB-INF/web.xml. > > > > Ideally, I'd like to be able to build my web application on my development > > machine, package it as a WAR file, and deploy it by just FTPing the WAR > into > > the appropriate directory on my various Orion instances. The problem is, > my > > configuration parameters are in WEB-INF/web.xml, which is inside the WAR > > file. These configuration parameters have to be different for my > different > > instances (e.g. different directory structure, different database > connection > > parameters, etc.). But the web.xml file inside the WAR file always > > overwrites the one already deployed, which means each time I distribute my > > WAR file to my different instances, I have to 1) wait for Orion to > > auto-unpack the archive, then 2) manually change the settings in > > WEB-INF/web.xml on each instance. > > > > Of course if I avoid putting container-specific (i.e. deployment > > environment-specific) parameters in WEB-INF/web.xml, then the same web.xml > > will work on all of my various instances. But then where do I put config > > parameters such as "log level," "log file directory," and "path to > > my-secret-files", etc., which are used by the application but are specific > > to the particular deployment environment? > > > > Does Orion provide a way to specify config parameters for an application > on > > a per-container basis? > > > > Thanks, > > > > Attila > > > > > >
Re: [1.4.8] WebContainer bug
Steffen, Are the classes you are looking for packaged as JARs? I believe Orion will only look for JARs under WEB-INF/lib. For standalone classes, you need to put them under WEB-INF/classes. Hope this helps, Attila - Original Message - From: "Steffen Stundzig" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, May 17, 2001 10:01 AM Subject: [1.4.8] WebContainer bug > Hi, > > I've installed Cocoon as servlet inside of the global application. > Works fine and fast with orion. > > The servlet generates JavaCode that would be compiled and loaded at runtime. > But now I've the problem, that some classes could not be found, because > the orion-classloader searches only in ORION_HOME/lib and not in the servlets > war archive in WEB-INF/lib. > > How can I configure orion to look also in the WEB-INF/lib dir, to search > for classes, that are only needed by the deployed war? > > Regards > Steffen... > > -- > __ > Steffen Stundzigmailto:[EMAIL PROTECTED] > SMB GmbHhttp://www.smb-tec.com > > > > >
Deployment to multiple instances...?
Hi, This is a newbie question, I guess... Here is the situation: I have a web application (a bunch of servlets, JSPs, and supporting classes) I want to deploy to multiple Orion instances. Some of these instances are for QA, some are inside the firewall, and some are outside the firewall. My application has external dependencies on databases and files in the filesystem that are not part of the application itself. Rather than hard-code these values, I include them as s in WEB-INF/web.xml. Ideally, I'd like to be able to build my web application on my development machine, package it as a WAR file, and deploy it by just FTPing the WAR into the appropriate directory on my various Orion instances. The problem is, my configuration parameters are in WEB-INF/web.xml, which is inside the WAR file. These configuration parameters have to be different for my different instances (e.g. different directory structure, different database connection parameters, etc.). But the web.xml file inside the WAR file always overwrites the one already deployed, which means each time I distribute my WAR file to my different instances, I have to 1) wait for Orion to auto-unpack the archive, then 2) manually change the settings in WEB-INF/web.xml on each instance. Of course if I avoid putting container-specific (i.e. deployment environment-specific) parameters in WEB-INF/web.xml, then the same web.xml will work on all of my various instances. But then where do I put config parameters such as "log level," "log file directory," and "path to my-secret-files", etc., which are used by the application but are specific to the particular deployment environment? Does Orion provide a way to specify config parameters for an application on a per-container basis? Thanks, Attila BEGIN:VCARD VERSION:2.1 N:Bodis;Attila FN:Attila Bodis NICKNAME:Attila ORG:OracleMobile;OracleMobile Online Studio TITLE:Development Lead TEL;WORK;VOICE:(650) 506-4767 TEL;CELL;VOICE:(650) 346-6156 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;10bpM205;500 Oracle Pkwy=0D=0AMailstop 10bp2;Redwood Shores;CA;94065 LABEL;WORK;ENCODING=QUOTED-PRINTABLE:10bpM205=0D=0A500 Oracle Pkwy=0D=0AMailstop 10bp2=0D=0ARedwood Shores, CA 94= 065 X-WAB-GENDER:2 URL: URL:http://studio.oraclemobile.com EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20010517T175748Z END:VCARD
Re: does JSP request.getParameterNames() work in Orion 1.4.5?
>From reading the JSP 1.1 spec (Sec. 2.13.6.1, p. 69): This action has two mandatory attributes: name and value. Name indicates the name of the parameter; value, which may be a request-time expression, indicates its value. It's not particularly clearly worded, but the implication seems to be that only the value can be computed at request time. The name has to be constant. Attila - Original Message - From: "Garret Wilson" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 9:59 AM Subject: Re: does JSP request.getParameterNames() work in Orion 1.4.5? > Actually, request.getParameterNames() works fine -- I just realized I was > modifying one page and testing another. > > However, I was using request.getParameterNames() to try to find the source > of my *real* problem. My JSP parameters really look like this: > > > > value="<%=WebConstants.ABOUT_SECTION%>"/> > > > > That is, I'm dynamically inluding a parameter name and its value. The > request.getParameterNames() enumeration returns, in the following order, > "test2" and "test1", not the middle parameter name which should be > "selectedSection". If I hard-code in "selectedSection" (but leave the value > dynamically included), it works. Why? > > Garret > > - Original Message - > From: "Garret Wilson" <[EMAIL PROTECTED]> > To: "Orion-Interest" <[EMAIL PROTECTED]> > Sent: Thursday, May 10, 2001 9:48 AM > Subject: does JSP request.getParameterNames() work in Orion 1.4.5? > > > > I'm passing a parameter to a JSP via: > > > > > > > > > > Yet in includedPage.jsp, request.getParameterNames() seems to be empty, > and > > the following returns false: > > > > request.getParameterNames().hasMoreElements() > > > > Yet I can access parameters directly using, for example, > > request.getParameter("test"). > > > > Does request.getParameterNames() work in Orion 1.4.5? > > > > Thanks, > > > > Garret > > > > >
RE: Number of JVMs on Orion..
Subrah, I don't think that's possible with Orion. Note that you can set up load-balancing across multiple IP addresses (one VM per IP address). The howto is on the Orion site (as well as on www.orionsupport.com, I think). But I don't think you can load-balance multiple Orion instances on the same server (i.e. IP address). Correct me if I'm wrong, anyone. Attila -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of sub k Sent: Monday, May 07, 2001 8:46 AM To: Orion-Interest Subject: RE: Number of JVMs on Orion.. Hi Frank, Thanks for your reply. If I do like this my URL will also be changed because of HTTP port. Am I correct? My concern is can we run multiple instances with some dispatcher mechanism to distribute the load equally to all these JVMs on the same server? Thanks Subrah --- Frank Eggink <[EMAIL PROTECTED]> wrote: > As long as the port numbers for HTTP, JMs (if used) > and RMI do not overlap you > can start as many Orion instances as you like. > > See the files jms.xml, rmi.xml and > default-website.xml for the port settings. > > > Make sure you use the correct port numbers in the > clients as well :-) > > > FE > > > On Sunday, May 06, 2001 8:55 AM, sub k > [SMTP:[EMAIL PROTECTED]] wrote: > > Hi Tim, > > This is to start the Orion and ofcourse it creates > a > > JVM and it runs Orion. I have to create multiple > JVMs > > that runs multiple Orion servers on one machine. > Can > > you clarify how to do it. Do I have to run this > > command multiple times, and if I run like that, If > I > > am using sessions, the requests go to right server > or > > not? > > Thanks > > Subrah > > > > > > --- Tim Endres <[EMAIL PROTECTED]> wrote: > > > > > >java -jar orion.jar > > > > > > > Hi Tim, > > > > Thanks for your reply. I would like to know > how > > > can we > > > > create JVMs running Orion on one machine? > > > > Thanks > > > > Subrah > > > > > > > > --- Tim Endres <[EMAIL PROTECTED]> wrote: > > > > > Orion does not invoke JVMs. It runs within a > > > JVM. > > > > > Thus, the answer is one. > > > > > > > > > > Of course, this does not prevent you from > > > starting > > > > > any number of JVMs running Orion. > > > > > > > > > > > Hi, > > > > > > Can anyone explain how many number of JVMs > can > > > we > > > > > > create on Orion? > > > > > > Thanks > > > > > > Subrah > > > > > > > > > > > > > > > > > > > > > > > __ > > > > Do You Yahoo!? > > > > Yahoo! Auctions - buy the things you want at > great > > > prices > > > > http://auctions.yahoo.com/ > > > > > > > > > > > > > > > > __ > > Do You Yahoo!? > > Yahoo! Auctions - buy the things you want at great > prices > > http://auctions.yahoo.com/ > > > __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Binding OracleConectionPoolDataSource to JNDI name?
Title: Harley, I am new to all this, but I am curious why you are trying to bind your datasource programmatically. Here's what I have in my $ORION_HOME/config/data-sources.xml: class="oracle.jdbc.pool.OracleConnectionPoolDataSource" connection-driver="oracle.jdbc.driver.OracleDriver" connection-retry-interval="1" inactivity-timeout="30" location="jdbc/MyDataSource" max-connections="10" min-connections="0" name="MyDataSource" password="tiger" url="jdbc:oracle:thin:@myserver:1521:MYSID" username="scott" wait-timeout="10" /> Then, from within my Java code, I have: ... InitialContext ctx = new InitialContext(System.getProperties()); PooledConnection pc = (PooledConnection)pc.lookup("jdbc/MyDataSource") Connection conn = pc.getConnection(); ... Am I missing something? Wouldn't this work? (Essentially, Orion does the JNDI binding for you.) Attila -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Harley RanaSent: Monday, May 07, 2001 11:43 AMTo: Orion-InterestSubject: Binding OracleConectionPoolDataSource to JNDI name? I have used the OracleConnectionPoolDataSource form a normal class, with out binding it to JNDI and it works fine. When i try and bind it i get an exception that saying :Error binding to server: java.io.NotSerializableException: oracle.jdbc.driver.OracleDriverAnyone got this working?this is the code in the constructor of a normal class. im using Oracle8i 1.1.7 Thanks alot for any help you can give! Harley Rana. try{ System.setProperty("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory"); System.setProperty("java.naming.provider.url", "ormi://localhost/Togotech"); System.setProperty("java.naming.security.principal","admin"); System.setProperty("java.naming.security.credentials","rana21b"); InitialContext jndiContext = new InitialContext(); OracleConnectionPoolDataSourcepool = new oracle.jdbc.pool.OracleConnectionPoolDataSource(); pool.setURL("jdbc:oracle:thin:@localhost:1521:net"); pool.setUser("scott"); pool.setPassword("tiger"); pool.setDataSourceName("Togotech_Data"); System.out.println("Binding to JNDI..."); jndiContext.rebind("OracleDatasource",pool); }catch(SQLException s){ System.out.println("SQL exception - "+s); } catch(NamingException n){ System.out.println("Naming exception - "+n); }
Re: Tools.jar File
Brandy, It enables auto-compilation of JSPs in your web applications. If you didn't have tools.jar in your Orion home directory, then you would have to precompile all your JSPs (and recompile them by hand each time you change them), which is a pain. Cheers, Attila - Original Message - From: B. Dawkins To: Orion-Interest Sent: Friday, May 04, 2001 2:11 PM Subject: Tools.jar File Hello, I'm new to the Orion Server. What is the purpose of copying the tools.jar file from my jdk1.3.0_02\lib directory into the d:\orion directory? Thanks and I appreciate you help. Brandy Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: remote shutdown of orion 1.4.8
Joni, I am having the same problem using 1.4.5; strangely, I am able to use -shutdown just fine as long as none of my servlets/JSPs do any JDBC calls. Once I get deeper into my app where I start hitting the database, Orion refuses to shut down in exactly the way you describe. Attila - Original Message - From: Joni Suominen To: Orion-Interest Sent: Friday, May 04, 2001 4:47 AM Subject: Re: remote shutdown of orion 1.4.8 [EMAIL PROTECTED] wrote:> > Folks,> > The following remote shutdown command does not work anymore in 1.4.8 (it> works fine in 1.4.7), any ideas? bug?> > java -jar admin.jar ormi://localhost admin password -shutdownHi!It is a bit unclear for me how the shutdown process should work. When Iinitiate "java -jar admin.jar ormi://localhost admin password -shutdown"the message "Shutting down..." is printed on the log. After that Orionno longer responds to any requests but all the Java processes are stillkicking alive:$ ps ax21242 pts/2 S 0:00 /usr/java/jdk1.3/bin/i386/native_threads/java-server -Xms8m -Xmx192m -Djava...21266 pts/2 S 0:00 /usr/java/jdk1.3/bin/i386/native_threads/java-server -Xms8m -Xmx192m -Djava..Platform: RedHat Linux 7.0, HotSpot Virtual Machine, Orion 1.4.7Is there a way to shutdown Orion so that it stops all Java procesessestoo?-- Joni[EMAIL PROTECTED]
Re: Form-based authentication: original request URI...?
Thanks for the suggestion; that's what I ended up doing. Not pretty, but works for now. Attila - Original Message - From: cybermaster To: Orion-Interest Sent: Thursday, May 03, 2001 6:54 PM Subject: RE: Form-based authentication: original request URI...? Hi Attila, FORM based authentication is somewhat limited with respect to the use-cases it supports. On your error page include something like: Try again This works fine for me. Cheers --peter 650-561-9273 -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Attila BodisSent: Thursday, May 03, 2001 6:25 PMTo: Orion-InterestSubject: Form-based authentication: original request URI...? Hi, I managed to get forms-based authentication working (Orion 1.4.5/Win2K), but I have a question. Here is what happens: 1) user tries to access protected resource "protected.jsp" 2) Orion redirects user to the login page "login.jsp" instead 3) user enters *incorrect* userid/password and submits the form 4) Orion shows the error page "error.jsp", as it should So far, so good, but on the error page I'd like to say something like "click here to retry," with a link to the *original* page that triggered the authentication in the first place (in this case "protected.jsp"). Note that if I put a link to "login.jsp" on the error page, the user will be stuck in a loop as successful authentication will just redisplay the login page itself. The question is: is there a way (either inside the login page or in the error page) of somehow determining what the original request URI was that triggered the authentication to begin with? I already tried request.getRequestURI() inside "login.jsp," but it evaluates to "login.jsp," not "protected.jsp" as I'd like. Clearly Orion stores the original request URI somewhere (otherwise it wouldn't know where to go after a successful login), but how can I get at this information??? Any help would be greatly appreciated! Attila Attila Bodis Development Manager, Mobile Hosting 800 Bridge Pkwy #2068 Redwood Shores, CA 94065 (650) 506-4767 (w) (650) 346-6156 (m) [EMAIL PROTECTED] Visit the OracleMobile Online Studio at http://studio.oraclemobile.com.
Form-based authentication: original request URI...?
Hi, I managed to get forms-based authentication working (Orion 1.4.5/Win2K), but I have a question. Here is what happens: 1) user tries to access protected resource "protected.jsp" 2) Orion redirects user to the login page "login.jsp" instead 3) user enters *incorrect* userid/password and submits the form 4) Orion shows the error page "error.jsp", as it should So far, so good, but on the error page I'd like to say something like "click here to retry," with a link to the *original* page that triggered the authentication in the first place (in this case "protected.jsp"). Note that if I put a link to "login.jsp" on the error page, the user will be stuck in a loop as successful authentication will just redisplay the login page itself. The question is: is there a way (either inside the login page or in the error page) of somehow determining what the original request URI was that triggered the authentication to begin with? I already tried request.getRequestURI() inside "login.jsp," but it evaluates to "login.jsp," not "protected.jsp" as I'd like. Clearly Orion stores the original request URI somewhere (otherwise it wouldn't know where to go after a successful login), but how can I get at this information??? Any help would be greatly appreciated! Attila Attila Bodis Development Manager, Mobile Hosting 800 Bridge Pkwy #2068 Redwood Shores, CA 94065 (650) 506-4767 (w) (650) 346-6156 (m) [EMAIL PROTECTED] Visit the OracleMobile Online Studio at http://studio.oraclemobile.com. BEGIN:VCARD VERSION:2.1 N:Bodis;Attila FN:Attila Bodis NICKNAME:Attila ORG:OracleMobile;OracleMobile Online Studio TITLE:Development Lead TEL;WORK;VOICE:(650) 506-4767 TEL;CELL;VOICE:(650) 346-6156 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;10bpM205;500 Oracle Pkwy=0D=0AMailstop 10bp2;Redwood Shores;CA;94065 LABEL;WORK;ENCODING=QUOTED-PRINTABLE:10bpM205=0D=0A500 Oracle Pkwy=0D=0AMailstop 10bp2=0D=0ARedwood Shores, CA 94= 065 X-WAB-GENDER:2 URL: URL:http://studio.oraclemobile.com EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20010504T002441Z END:VCARD