Fw: Please help me, How to get Orion's Environment Such as HostName, Port...???
- Original Message - From: urey To: Larry Velez Sent: Sunday, March 18, 2001 5:40 PM Subject: Re: Please help me, How to get Orion's Environment Such as HostName, Port...??? Hi Larry, It's sorry for my mistake. I want to write some Ejbs, and running them on Orion. the one of the Ejb for to store all the config info, and I have two methods for to load and reload all the config files( *.xml) in it, The config files( *.xml) all in my ear package. I don't know how to access my config files flexible in my Ejb. hope this help you to know my question Thanks you yours Urey - Original Message - From: Larry Velez To: 'urey' Sent: Saturday, March 17, 2001 12:38 AM Subject: RE: Please help me, How to get Orion's Environment Such as HostName, Port...??? I am not sure I understand your question but it looks like you are having trouble with your classpath. How are you launching Orion? What OS are you running? -Larry -Original Message-From: urey [mailto:[EMAIL PROTECTED]]Sent: Friday, March 16, 2001 4:48 AMTo: Larry VelezCc: Larry VelezSubject: Re: Please help me, How to get Orion's Environment Such as HostName, Port...??? Hello Larry, Thanks for your hint. I reread the web-site.xml.html just now. Really, I can getsome Orion server's environment transit itself config/ *.xml in my application programme. But, I think there are some trouble with me. Must Icodingsome parse for the *.xml?? If not, How will I do in my application programme?? and I can't get Orion's running really PATH from its config/*.xml. in its config/*.xmlonly have relative PATH. How could I do? Could you Please give me some helpful hint again, Thanks you again yoursUrey - Original Message - From: Larry Velez To: Urey Sent: Friday, March 16, 2001 3:46 PM Subject: RE: Please help me, How to get Orion's Environment Such as HostName, Port...??? These settings can be found in the web-site.xml file. You can read up on the details here: http://www.orionserver.com/docs/web-site.xml.html Larry Original Message-From: Urey.u [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 15, 2001 9:23 PMTo: Orion-InterestCc: Urey; Orion-InterestSubject: Please help me, How to get Orion's Environment Such as HostName, Port...??? Dear All, When Orion Server was started. Could you please tell me,how to get Orion's environment Such as HostName,Port,Running Pathand so on in my application class file , not applet, servlet or JSP file?. Regards yoursUrey
Re: Please help me, How to get Orion's Environment Such as HostName, Port...???
Hi, You can try http://127.0.0.1 in your browser after starting orion as java -jar orion.jar If you have some other web server please shutdown that server and try again restarting the orion regards waheed - Original Message - From: Urey.u To: Orion-Interest Cc: Urey ; Orion-Interest Sent: Friday, March 16, 2001 6:23 AM Subject: Please help me, How to get Orion's Environment Such as HostName, Port...??? Dear All, When Orion Server was started. Could you please tell me,how to get Orion's environment Such as HostName,Port,Running Pathand so on in my application class file , not applet, servlet or JSP file?. Regards yoursUrey
Please help me, How to get Orion's Environment Such as HostName, Port...???
Dear All, When Orion Server was started. Could you please tell me,how to get Orion's environment Such as HostName,Port,Running Pathand so on in my application class file , not applet, servlet or JSP file?. Regards yoursUrey
Please help me, How to get Orion's Environment Such as HostName, Port...???
Dear All, When Orion Server was started. Could you please tell me,how to get Orion's environment Such as HostName,Port,Running Pathand so on in my application class file , not applet, servlet or JSP file?. Regards yoursUrey
RE: how to set environment properties for an app?
Have only one application per java instance. Each with their own application.xml, and whatever other things they need. Another option is to put the configuration items into the web.xml of each of your apps, perhaps as initialization parameters to a startup servlet. That startup servlet can then put those parameters into a configuration object that is specific to your application. Tony -Original Message- From: Ari Halberstadt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 09, 2001 1:30 PM To: Orion-Interest Subject:RE: how to set environment properties for an app? This is what I originally did, and it works fine if you have just one copy of the app running. What I need to do, though, is run two copies of the app, each one with a slightly different config, but system environment properties apply to all apps running within an instance of orion. I need a per-app config, like what would be provided in orion-application.xml or orion-web.xml, only I can't find a way to do this. Tony Wilson [EMAIL PROTECTED] on 01/04/2001 17:47:43 Please respond to Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] cc: (bcc: Ari Halberstadt/Lycos) Subject: RE: how to set environment properties for an app? To do this, we pass in environment variables on the command line to the call to java that starts orion using the -D option So java -Dconfig=OUR.CONFIG.STRING -jar /opt/orion/orion.jar You can then access them using String configKey = System.getProperty("config"); Hope that helped. Tony Wilson
Re: Globally available environment vars
Could you please elaborate on this? What do you mean when you say "domain context"? Also, I was under the impression that these values were read-only, not writable. What am I missing? tim. Yes. I use domain contexts just like you describe to store page hit counts, so I can see traffic from a remote client. - Original Message - From: "Tim Endres" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Friday, January 05, 2001 3:23 PM Subject: RE: Globally available environment vars Are you sure? Seems to me that all you have to do is use the constructor InitialContext( Properties props ) to specify the environment that you wish via the java.naming.provider.url property. In other words, can't a web module just use "ormi://host:port/appname" to get a Context that can access the environment of the ejb module "appname"? well, the problem is that there seems not to be a context which is accessable from all the modules! It looks like this may be a J2EE deficiency .. I'm just gonna use a properties file .. jd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Smith Sent: Friday, January 05, 2001 1:19 PM To: Orion-Interest Subject: RE: Globally available environment vars How about having an initializer bind some property files into JNDI that can then be accessed by the web ejb modules.
Re: Globally available environment vars
Gladly. In the .jsps I want to record hit counts, I have: %@ page import = "javax.naming.*"% % Context ctx = new InitialContext(); long lhits = 0; try { Long LhitCount = (Long) ctx.lookup("domain/page.jsp"); lhits = LhitCount.longValue() + 1; ctx.rebind("("domain/page.jsp", new Long( lhits)); } catch(NameNotFoundException nnfe) { % not found % lhits = 1; ctx.bind("("domain/page..jsp", new Long(lhits)); } % By domain context, I mean the root context for the domain (or web application). While you may be right about Bindings being read only (and what I'm doing is actually removing an old binding and creating a new one), the result is, in effect, a writable environment variable that I can see from a client. Note that I do this 'inside' the domain (in the app servers JVM, not the client's.) I haven't tried it from the client. - Original Message - From: "Tim Endres" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Cc: "Reid Hartenbower" [EMAIL PROTECTED] Sent: Saturday, January 06, 2001 3:17 PM Subject: Re: Globally available environment vars Could you please elaborate on this? What do you mean when you say "domain context"? Also, I was under the impression that these values were read-only, not writable. What am I missing? tim. Yes. I use domain contexts just like you describe to store page hit counts, so I can see traffic from a remote client. - Original Message - From: "Tim Endres" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Friday, January 05, 2001 3:23 PM Subject: RE: Globally available environment vars Are you sure? Seems to me that all you have to do is use the constructor InitialContext( Properties props ) to specify the environment that you wish via the java.naming.provider.url property. In other words, can't a web module just use "ormi://host:port/appname" to get a Context that can access the environment of the ejb module "appname"? well, the problem is that there seems not to be a context which is accessable from all the modules! It looks like this may be a J2EE deficiency .. I'm just gonna use a properties file .. jd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Smith Sent: Friday, January 05, 2001 1:19 PM To: Orion-Interest Subject: RE: Globally available environment vars How about having an initializer bind some property files into JNDI that can then be accessed by the web ejb modules.
Globally available environment vars
We're getting to the point where we're integrating a bunch of stuff into a web app .. two different ejb modules plus a web module. I'd like to have a single central place where user-customizable configuration can be stored. Experimenting with env-entry in the web.xml file seems to indicate that those environment vars are not available (by any naming convention I've been able to think up) in the ejb modules. I can put the env-entry into the deployment descriptor for the bean that needs the value and get access, but that would be too messy for the end-user to be messing with! Anyone have any ideas?
RE: Globally available environment vars
How about having an initializer bind some property files into JNDI that can then be accessed by the web ejb modules.
RE: Globally available environment vars
Are you sure? Seems to me that all you have to do is use the constructor InitialContext( Properties props ) to specify the environment that you wish via the java.naming.provider.url property. In other words, can't a web module just use "ormi://host:port/appname" to get a Context that can access the environment of the ejb module "appname"? well, the problem is that there seems not to be a context which is accessable from all the modules! It looks like this may be a J2EE deficiency .. I'm just gonna use a properties file .. jd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Smith Sent: Friday, January 05, 2001 1:19 PM To: Orion-Interest Subject: RE: Globally available environment vars How about having an initializer bind some property files into JNDI that can then be accessed by the web ejb modules.
how to set environment properties for an app?
How do i set env properties for an app? I need to pass in an environment property in some manner to customize a j2ee app so that I can have two (or more) versions of the app running off of the same deployment ear. I looked in orion-application.xml, but there is nothing there. I tried env-entry-mapping in orion-web.xml, but it didn't work either. Also, if I edit my web.xml file (in a development directory), Orion redeploys over the custom orion-web.xml, erasing my changes. Orion also rewrites the original web.xml file, obliterating comments. (Bugs in orion?)
Has anyone used RUE to monitor Orion in a production environment?
RUE - http://rue.nolimits.ro/ This looks like a very useful tool to monitor Orion in a production environment, has anyone done this? You could monitor things like: - memory usage - open connections - connections in use - status of connections (ie up down full) Has anyone used it? Thought about it? Would it need help from the Orion team in creating the appropriate data channel classes? Mike
RE: ORION running under Solaris Environment
One thing we have found is the Solaris JDK 1.3 is very, very slow running Orion (less than half the speed of a MHz equivalent PC running Windows). You'll want to use the last production JDK 1.2.2 (it's either _06 or _05a). It performs much better. Now the question is why is the Solaris 1.3 the only one that is slower than the platform's JDK 1.2? On Linux and NT 1.3 is considerably faster. Stephen Drye BellHowell MMT -Original Message- From: Ismael Blesa Part [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 25, 2000 1:39 PM To: Orion-Interest Subject: Re: ORION running under Solaris Environment Hi David, You can do whatever you want, the hardware requiriments are not very big, and on a development environment normally you won't have a lot of users. You could have the more powerful machine like a main server when all the developments could be tested. Another possibility is that you could have your development on Windows or Linux and your test server on Solaris. David Sierra Fernandez wrote: I want to build my development department with Orion under Sun Solaris. I want advise about: * How it should be implemented: one server with Orion inside it and terminals running that instance of Orion or Orion installed in all of the workstations * What are the hardware requirements in both alternatives( workstations and server I'd prefer if you are concret, I say, especific machines like Ultra 1,2 ... workstations like Sparc 20,... and memory requirements... TIA. - David Sierra Fern ndez Valladolid (SPAIN) -- -- Sierr@ --
ORION running under Solaris Environment
I want to build my development department with Orion under Sun Solaris. I want advise about: * How it should be implemented: one server with Orion inside it and terminals running that instance of Orion or Orion installed in all of the workstations * What are the hardware requirements in both alternatives( workstations and server I'd prefer if you are concret, I say, especific machines like Ultra 1,2 ... workstations like Sparc 20,... and memory requirements... TIA. - David Sierra Fern ndez Valladolid (SPAIN) -- -- Sierr@ --
Re: ORION running under Solaris Environment
Hi David, You can do whatever you want, the hardware requiriments are not very big, and on a development environment normally you won't have a lot of users. You could have the more powerful machine like a main server when all the developments could be tested. Another possibility is that you could have your development on Windows or Linux and your test server on Solaris. David Sierra Fernandez wrote: I want to build my development department with Orion under Sun Solaris. I want advise about: * How it should be implemented: one server with Orion inside it and terminals running that instance of Orion or Orion installed in all of the workstations * What are the hardware requirements in both alternatives( workstations and server I'd prefer if you are concret, I say, especific machines like Ultra 1,2 ... workstations like Sparc 20,... and memory requirements... TIA. - David Sierra Fern ndez Valladolid (SPAIN) -- -- Sierr@ --
Lookup of Orion-based EJB from Tomcat-based servlet (java:comp/env namespace is only available from within the J2EE environment)
NOTE: This is a repost. The message now includes a subject (oops!) and more detail. A coworker and I are trying to create a servlet that will run on his computer under Tomcat. This servlet is attempting to lookup and use an EJB deployed on my computer under Orion. This servlet is using the com.evermind.server.ApplicationInitialContextFactory. When the servlet performs the context object's lookup method (using the String literal "java:com/env/fungi"), we get the following exception displayed on his computer: "Exception: javax.naming.NamingException: java:comp/env namespace is only available from within the J2EE environment ." A command-line client application run on the same coworker's computer IS able to successfully lookup the same EJB on my computer using the "java:com/env/fungi" String literal. This command-line client is using the com.evermind.server.ApplicationClientInitialContextFactory. We have been unable to find any documentation about the NamingException described above. Please, would someone explain reasons we might be getting this exception and/or the proper way to access an Orion EJB from a Tomcat servlet? We would appreciate any assistance that can be given. Thank you. Mark McLain Systems Developer Sybron Laboratory Products Corporation
RE: Lookup of Orion-based EJB from Tomcat-based servlet (java:comp/env namespace is only available from within the J2EE environment)
I have never tried to do what you are talking about, but you might want to try using com.evermind.server.rmi.RMIInitialContextFactory as your INITIAL_CONTEXT_FACTORY within your servlet. so.. Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory"); env.put(Context.PROVIDER_URL, "ormi://yourserver.com/yourapp"); env.put(Context.SECURITY_PRINCIPAL, myUser); env.put(Context.SECURITY_CREDENTIALS, myPass); Context initCtx = new InitialContext(env); initCtx.lookup(...etc.,etc. -jason NOTE: This is a repost. The message now includes a subject (oops!) and more detail. A coworker and I are trying to create a servlet that will run on his computer under Tomcat. This servlet is attempting to lookup and use an EJB deployed on my computer under Orion. This servlet is using the com.evermind.server.ApplicationInitialContextFactory. When the servlet performs the context object's lookup method (using the String literal "java:com/env/fungi"), we get the following exception displayed on his computer: "Exception: javax.naming.NamingException: java:comp/env namespace is only available from within the J2EE environment ." A command-line client application run on the same coworker's computer IS able to successfully lookup the same EJB on my computer using the "java:com/env/fungi" String literal. This command-line client is using the com.evermind.server.ApplicationClientInitialContextFactory. We have been unable to find any documentation about the NamingException described above. Please, would someone explain reasons we might be getting this exception and/or the proper way to access an Orion EJB from a Tomcat servlet? We would appreciate any assistance that can be given. Thank you. Mark McLain Systems Developer Sybron Laboratory Products Corporation
RE: Lookup of Orion-based EJB from Tomcat-based servlet (java:comp/env namespace is only available from within the J2EE environment)
Try "java:comp/env/fungi". ^ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of McLain, Mark Sent: Wednesday, October 04, 2000 11:57 AM To: Orion-Interest Subject: Lookup of Orion-based EJB from Tomcat-based servlet ("java:comp/env namespace is only available from within the J2EE environment") NOTE: This is a repost. The message now includes a subject (oops!) and more detail. A coworker and I are trying to create a servlet that will run on his computer under Tomcat. This servlet is attempting to lookup and use an EJB deployed on my computer under Orion. This servlet is using the com.evermind.server.ApplicationInitialContextFactory. When the servlet performs the context object's lookup method (using the String literal "java:com/env/fungi"), we get the following exception displayed on his computer: "Exception: javax.naming.NamingException: java:comp/env namespace is only available from within the J2EE environment ." A command-line client application run on the same coworker's computer IS able to successfully lookup the same EJB on my computer using the "java:com/env/fungi" String literal. This command-line client is using the com.evermind.server.ApplicationClientInitialContextFactory. We have been unable to find any documentation about the NamingException described above. Please, would someone explain reasons we might be getting this exception and/or the proper way to access an Orion EJB from a Tomcat servlet? We would appreciate any assistance that can be given. Thank you. Mark McLain Systems Developer Sybron Laboratory Products Corporation
Re: HTTPSession timeouts in SSL environment
Todd McGrath wrote: Perplexed by a problem I'm having: I have a custom login solution that writes a string to a user's HttpSession Object: session.setAttribute("login", new java.util.Date().toString()); In the app, I have a controller servlet that checks for this session attribute with each request: Object done = session.getAttribute("login"); if (done == null) { res.sendRedirect(relogin); ... These are not exactly answers on your question, but some thoughts came as I was reading it. Why are you using sendRedirect() method instead of RequestDispatcher object ? The one reason doing so I see would be to redirect *outside* of your web app, but that solution wouldn't set any objects with "session" scope. Thus, it's not your case. Do you work with Servlet 2.2 compatible servlet container ? If so, read on... The difference between them (sendRedirect and RequestDispatcher) is that sendRedirect sends back to a browser a response that it should redirect its request to another page/site which implies another request will be sent by a browser. On the other hand, RequestDispatcher gives you possibilities to send a request forth and back (no matter how many times) between web components just on the server side rather then forcing to exchange information through the net as in previous case. I'd rather write: if (done == null) getServletContext.getRequestDispatcher(relogin).forward(req, res); assuming that req and res are HttpRequest and HttpResponse objects respectively. Also, I'm noticing a difference in the URL when I move around the site in a SSL session now. URLs now look like: https://protected.company.com/Action?cmd=myaccount;jsessionid=Oa6HTKaeJpki3ZNlC_zHuKUEu80WAyXKdC7qPTT4plE= I never had the "jsessionid=0a6H" before. That's described in Servlet specification (http://java.sun.com/products/servlet). jsessionid is reserved cookie name being visible when your application uses HttpSession, but a client (i.e. browser) doesn't support cookies. In that case, technique called URLRewritting is being used and all it does is to rewrite URL so the new URL includes jsessionid and a session is preserved. -Todd Jacek Laskowski
Re: HTTPSession timeouts in SSL environment
As far as I remember, there is another difference between sendRedirect() and RequestDispatcher.forward(). I once tested both alternatives, and I found that with forward(), the client never gets to know that he hase been sent to another page, i.e. the URL does not show, the reload button reloads the page from where the forward was done, etc. I think I remember there were even problems with links on the page.. The difference between them (sendRedirect and RequestDispatcher) is that sendRedirect sends back to a browser a response that it should redirect its request to another page/site which implies another request will be sent by a browser. On the other hand, RequestDispatcher gives you possibilities to send a request forth and back (no matter how many times) between web components just on the server side rather then forcing to exchange information through the net as in previous case. I'd rather write: if (done == null) getServletContext.getRequestDispatcher(relogin).forward(req, res);
RE: HTTPSession timeouts in SSL environment
Title: RE: HTTPSession timeouts in SSL environment Hi Chris, you are right. using a RequestDispatcher only redirects the request on the server side, wihtout informing the client. a sendRedirect() will ask the client to go to another page, thus changing header info and the whole thing. -Original Message- From: Christian Sell [mailto:[EMAIL PROTECTED]] Sent: den 1 september 2000 11:17 To: Orion-Interest Subject: Re: HTTPSession timeouts in SSL environment As far as I remember, there is another difference between sendRedirect() and RequestDispatcher.forward(). I once tested both alternatives, and I found that with forward(), the client never gets to know that he hase been sent to another page, i.e. the URL does not show, the reload button reloads the page from where the forward was done, etc. I think I remember there were even problems with links on the page.. The difference between them (sendRedirect and RequestDispatcher) is that sendRedirect sends back to a browser a response that it should redirect its request to another page/site which implies another request will be sent by a browser. On the other hand, RequestDispatcher gives you possibilities to send a request forth and back (no matter how many times) between web components just on the server side rather then forcing to exchange information through the net as in previous case. I'd rather write: if (done == null) getServletContext.getRequestDispatcher(relogin).forward(req, res);
Re: HTTPSession timeouts in SSL environment
Christian Sell wrote: As far as I remember, there is another difference between sendRedirect() and RequestDispatcher.forward(). I once tested both alternatives, and I found that with forward(), the client never gets to know that he hase been sent to another page, i.e. the URL does not show, the reload button reloads the page from where the forward was done, etc. I think I remember there were even problems with links on the page.. That's what I've said. It speeds up your application response because of missing additional requests just to get the required resource/page. It also happens in case of include, but workflow is opposite so your page collect all information before sending it back to a client. I'd not say it's a problem. If your client refreshes a page, depending on browser settings, there might be another request doing exactly the same thing as before, so the results might be the same as well. On the other hand, sendRedirect() sends a page with a header containing information that a browser must request another page being set in header. So, that's pretty the same as in above case when using RequestDispatcher as a browser refreshes current page - no matter if it came from sendRedirect() or RequestDispatcher. I didn't see any problems so far. Jacek Laskowski
RE: HTTPSession timeouts in SSL environment
You know, I do use RequestDispatcher forward method further down in the code, but use sendRedirect if the client is not logged in (done==null). It is the only place where I use sendRedirect. Thank you for everyone's excellent responses on the merits of RequestDispatcher. However, the issue I was concerned about was the HTTP session timeouts. I have the session timeout set to 15 minutes in the web.xml file, but SSL HTTP sessions seem to time out after 60-90 seconds. After reading through some the mailing list, I tried setting my web app to "shared=true" and in the secure-web-site.xml file and now the HTTP sessions are working as planned. (timeouts after 15 minutes). What are the specific security ramifications of this setting? I have a unsecure site and a secure site. The unsecure site only has 3-4 pages. Maybe I should just make add to secure site and then only have one site? Perhaps this would clear my HTTP session timeout issue. Any thoughts on the security ramifications of shared=true and insight into my SSL HTTP session timout issue would be greatly appreciated. -Todd --- Magnus Rydin [EMAIL PROTECTED] wrote: Hi Chris, you are right. using a RequestDispatcher only redirects the request on the server side, wihtout informing the client. a sendRedirect() will ask the client to go to another page, thus changing header info and the whole thing. -Original Message- From: Christian Sell [mailto:[EMAIL PROTECTED]] Sent: den 1 september 2000 11:17 To: Orion-Interest Subject: Re: HTTPSession timeouts in SSL environment As far as I remember, there is another difference between sendRedirect() and RequestDispatcher.forward(). I once tested both alternatives, and I found that with forward(), the client never gets to know that he hase been sent to another page, i.e. the URL does not show, the reload button reloads the page from where the forward was done, etc. I think I remember there were even problems with links on the page.. The difference between them (sendRedirect and RequestDispatcher) is that sendRedirect sends back to a browser a response that it should redirect its request to another page/site which implies another request will be sent by a browser. On the other hand, RequestDispatcher gives you possibilities to send a request forth and back (no matter how many times) between web components just on the server side rather then forcing to exchange information through the net as in previous case. I'd rather write: if (done == null) getServletContext.getRequestDispatcher(relogin).forward(req, res); __ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/
HTTPSession timeouts in SSL environment
Perplexed by a problem I'm having: I have a custom login solution that writes a string to a user's HttpSession Object: session.setAttribute("login", new java.util.Date().toString()); In the app, I have a controller servlet that checks for this session attribute with each request: Object done = session.getAttribute("login"); if (done == null) { res.sendRedirect(relogin); ... In my web.xml I have the session timeout set to 15 minutes. Everything is working fine in http:// sessions. Now that I have switched over to SSL (https://), sessions seem to timeout in about 1 minute. Why? Is this some sort of default setting? Also, I'm noticing a difference in the URL when I move around the site in a SSL session now. URLs now look like: https://protected.company.com/Action?cmd=myaccount;jsessionid=Oa6HTKaeJpki3ZNlC_zHuKUEu80WAyXKdC7qPTT4plE= I never had the "jsessionid=0a6H" before. Please help me understand what's going on here. -Todd __ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/
RE: Setting EJB environment
Use the env-entry tags in the deployment descriptor. Anything that you make available like this will be gettable using a JNDI lookup. Arved -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of WebDev Sent: Thursday, August 24, 2000 8:39 AM To: Orion-Interest Subject: Setting EJB environment I need to set the environment in the client so that i can receive informations (eg. current user) in my server (ejb, orion-server). what i tried on the clientside is: Hashtable pros = new Hashtable(); pros.put( Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationiInitialContextFactory" ); pros.put( Context.PROVIDER_URL, "ormi://localhost/ejbsamples" ); pros.put( Context.SECURITY_PRINCIPAL, szUser ); pros.put( Context.SECURITY_CREDENTIALS, szPasswd ); pros.put( "AdditionalInformation", szValue ); Context myContext = new InitialContext( pros ); myContext.lookup( ... ); On the serverside (eg. stateless sessionbean): SessionContext ctx; /* already set via setSessionContext-method */ String szUser = ctx.getCallerPrincipal().getName(); Properties myProps = ctx.getEnvironment(); The problem is - as I think - that it's not even possible to get the environment in the client-part, which obviously means, that no environment was set! For example the line (client): System.out.println( myContext.getEnvironment() ); just prints: {} (after I tried to set the properties, of course) Any help is appreciated! Thanks in advance Eli
ENVIRONMENT
I'm creating a complete web app and I know how to access from my code to env-entry, ejb-ref and resource-ref but I want to know how to access to a: init-param and context-param an the differnces in code between them. I haven't found any reference in J2EE spec nor Servlets esp. Is there any difference between accessing from a servlets or JSP, or accessing from an EJB I would appreciate your help. Thanks. - David Sierra Fern ndez Ingeniero Tecnico de Telecomunicaci¢n AULA RETECAL (CEDETEL) Universidad de Valladolid Campus Miguel Delibes E-Mail: [EMAIL PROTECTED] 47011 Valladolid (SPAIN) -- -- Sierr@ --
RE: EntityContext Environment
Thanks, that solved the class cast exception, but I am not getting anything for the EntityContext's environment. I get an empty Hashtable back. I guess a better question would be: To set the principal and credential in the EntityContext's environment, does that have to go through a SessionBean, or can any Java Object set it in the JNDI Context? Conrad Chan [EMAIL PROTECTED] on 07/05/2000 10:35:29 AM To: PETER V MINEARO/TheSphereHQ@TheSphereHQ cc: Subject: RE: EntityContext Environment I believe you should type-cast it to javax.naming.Context instead of InitialContext. I.e. Context ctx = ic1.lookup("java:comp/env") Conrad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 05, 2000 9:46 AM To: Orion-Interest Subject: EntityContext Environment I am trying to get the EntityContext's environment . Since Sun deprecated the getEnvironment() method. I have to use the JNDI interface. My code looks like this: try { InitialContext ic1 = new InitialContext(); InitialContext ic2 = (InitialContext)ic1.lookup("java:comp/env"); Hashtable env = ic2.getEnvironment(); Enumeration keys = env.keys(); while(keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = env.get(key); System.err.println(key.toString() + " = " + value.toString()); } } catch (Exception e) { } My problem is that I am getting an Exception java.lang.ClassCastException: com.evermind.util.r at com.tsis.utils.net.JNDIEnvironment.showEnvironment(JNDIEvironment.java:32) on the line: InitialContext ic2 = (InitialContext)ic1.lookup("java:comp/env"); I looked in the orion.jar file and that file is there. Not sure what to make of this. Does anybody have any idea what is going on??
Re: EntityContext Environment
Hello, Change InitialContext ic2 = (InitialContext)ic1.lookup("java:comp/env"); to Context context = (Context) ic1.lookup("java:comp/env"); and you shouldn't get the error. InitialContext is the starting context, not all contexts are InitialContexts, that's why you get a ClassCastException. Regards, Karl Avedal [EMAIL PROTECTED] wrote: I am trying to get the EntityContext's environment . Since Sun deprecated the getEnvironment() method. I have to use the JNDI interface. My code looks like this: try { InitialContext ic1 = new InitialContext(); InitialContext ic2 = (InitialContext)ic1.lookup("java:comp/env"); Hashtable env = ic2.getEnvironment(); Enumeration keys = env.keys(); while(keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = env.get(key); System.err.println(key.toString() + " = " + value.toString()); } } catch (Exception e) { } My problem is that I am getting an Exception java.lang.ClassCastException: com.evermind.util.r at com.tsis.utils.net.JNDIEnvironment.showEnvironment(JNDIEvironment.java:32) on the line: InitialContext ic2 = (InitialContext)ic1.lookup("java:comp/env"); I looked in the orion.jar file and that file is there. Not sure what to make of this. Does anybody have any idea what is going on??
Re: Orion in high load production environment
Hello, Since we don't have any "Orion success stories" on our site yet, I thought I'd name a few of our larger users to give you some idea about who are using Orion. * www.vpro.nl - was described on this list by Daniel Ockeloen * wap.hjemmenett.no - the WAP version of a large norwegian portal. This site is rather new and I don't think it gets over 100,000 hits/day so far considering it's a WAP site, but I thought it'd be interesting to mention a WAP site anyway. * www.aast.edu - educational institution * headlinewatch.com - delivering news from over 500 top news sites * javalobby.org - large Java community with almost 45,000 members and many hits/day. (They just set it up to use Orion today and there are still some problems in moving parts of the application from an older framework so expect a few hickups, but Orion has no problem with the load) Regards, Karl Avedal Hi All, Has anyone here used / is using Orion in production with over 100,000 hits/day? I'm evaluating several products right now, and would like to know this group's opinion on Orion's capabilities as far as load handling goes. Regards, Ashwin
Re: Orion in high load production environment
ASHWINJM wrote: Hi All, Has anyone here used / is using Orion in production with over 100,000 hits/day? I'm evaluating several products right now, and would like to know this group's opinion on Orion's capabilities as far as load handling goes. Regards, Ashwin Yep, www.vpro.nl has been running orion for many moons now and is allways above 100k hits (say between 300k and 400k) since its a tv broadcasters site it also has peaks (when a show is on air) to higher numbers say 1M. We don't really expect problems with orion in this area. Daniel Ockeloen.
Re: Orion in high load production environment
Hullo, Orion users: I'd like to know a short description of the hardware used with Orion to get this performance of load handling: number of servers, features of the servers (RAM, cache, processor,... ) OS, DataBase... Thank you very much, special to Daniel Ockeloen. -- Sierr@ -- On Mon, 21 Feb 2000, Daniel Ockeloen wrote: ASHWINJM wrote: Hi All, Has anyone here used / is using Orion in production with over 100,000 hits/day? I'm evaluating several products right now, and would like to know this group's opinion on Orion's capabilities as far as load handling goes. Regards, Ashwin Yep, www.vpro.nl has been running orion for many moons now and is allways above 100k hits (say between 300k and 400k) since its a tv broadcasters site it also has peaks (when a show is on air) to higher numbers say 1M. We don't really expect problems with orion in this area. Daniel Ockeloen.