RE: How to run an existing j2ee application on orion
I also got an error when I deployed my ear from Sun's J2EE server but I got a pretty detailed description of what orion didnt like in the XML files. With this information I could unpack my ear and fix the XML file and succeed to redeploy it. Some SUN specific information is stored in a sun...something...xml file for each bean. I think this information is ignored by Orion!?? Though you can deploy your bean but it will use the orion default settings. A typical thing that is put in these files is the name of the data source for an entity bean. /Herman -Original Message- From: Vani H.S. [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 9:04 PM To: Orion-Interest Subject: How to run an existing j2ee application on orion Hi All, I have a J2EE application build using Sun's J2EE server. Now, I want to deploy it on Orion. But it gives me some errors. I realized that there is some Orion Specific Information that needs to be a part of the EAR. Please can anybody tell me how I should go about making the Orion Specific information part of the ear? I am building the ears using ANT 1.4. Thanks, Vani _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Trouble with session between JSP and Servlet
Hello. I had the same problem. It was because of the browser. JSP location: http://myserver.com/Init.jsp The JSP redirected to the Servlet after it does it's job. BUT! The redirection went to: http://www.myserver.com/servlet/MyServlet The browser (IE) did not recognize this to be the same server and restarted the sessionID. So Orion thinks it is a different client. Test: try to access the JSP via: http://www.myserver.com/Init.jsp Then the redirect should work. Another problem is, that the Session cookie is bound to a start location: Cookie: JSessionID=1235r4123; path=/RootContextPath. Again the browser dows not recognize this cookie to be sent, when you try to access /servlet/* That is why I was forced to use filters, so that /RootContextPath/MyServletService/* was bound to MyServlet, and it worked. Try these things. They might help. Additional info is required for further investigation. May the shade of the tree strengthen you. Lachezar. I have a JSP and a Servlet in the same war file. Both URLs have been setup with security-constraints in the web.xml. When hitting the JSP first I am prompted to authenticate, which is expected behaviour. After authentication I then goto the Servlet and I am then again redirected to the login form and asked to authenticate. Has anyone else had this problem? Seems like being in the same war file the first authentication of the session should work for the entire war file. Thanks
RE: How can I start Orion Server as a service in Windows NT/2000 ?
Hi Justin, that works fine to start orion as a service, but if you want to stop it through services panel, it doesn't works. Are there any method to stop it through services panel? Regards Antonio -Mensaje original-De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Justin CrosbieEnviado el: lunes, 12 de noviembre de 2001 10:49Para: Orion-InterestAsunto: RE: How can I start Orion Server as a service in Windows NT/2000 ? Hi Vu, You need the JNT application from http://www.eworksmart.com/JNT/ Install this and type a command similar to the following, from where you installed Orion: jnt "/InstallAsService:Orion Application Server" "/SD[ORION_HOME]" -jar orion.jar where [ORION_HOME] is where you installed Orion. Worked for me, anyway. I had a job getting other java apps to run using this tool though :( This has come up in the list before, so do a search on the archive for more info. One thing I have noticed is that Orion runs slower this way than if you start it from a command prompt. Anyone know anything about this? I've asked this before. Cheers, Justin -Original Message-From: Vu Le Hung [mailto:[EMAIL PROTECTED]]Sent: 12 November 2001 04:38To: Orion-InterestSubject: How can I start Orion Server as a service in Windows NT/2000 ? Dear all, I'm trying to find a way to start Orion Server as a service in WindowsNT/2000( i.e.Orion will be started automatically when my computer startup without any user interaction). Any one know how to do this ? I tried this as below but it failed : 1. Write an small Win32 application "startorion.exe" that calls "java -jar orion.jar" 2. Register it as a automatic service (named MyService) with Win2000 using "Service Installation Wizard" tool in the Windows 2000 Server Resource Kit. 3. Restart my computer. Then I can find item "MyService" inthe list of all available services in my computer. But this service can not be start. Any idea ??? Thanks in advance. Vu Le Hung
Re: Monitoring web apps
Thanks Daniel , I will give it a try. Eddie - Original Message - From: Daniel López [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 8:38 AM Subject: Re: Monitoring web apps Hi Eddie, Here it goes: .- Environment - An apache web server configured with mod_proxy and SSI, running in port 80. Several orion instances with applications running in other ports. .- in httpd.conf - ... VirtualHost _default_:80 ProxyVia On # Proxy configuration for the different applications # Application X ProxyPass /nameX http://hostx.com:portX/nameX ProxyPassReverse /nameX http://hostx.com:portX/nameX # Application Y ProxyPass /nameY http://hostx.com:portY/nameY ProxyPassReverse /nameY http://hostx.com:portY/nameY # Error configuration for the Cannot establish connection case ErrorDocument 502 /SSIErrorHandler.shtml /VirtualHost ... .- Then the SSIErrorHandler.shtml looks like - !-- Define application paths -- !-- Define the path for application X -- !--#set var=appX value=/^\/nameX/ -- !-- Define the path for application Y -- !--#set var=appY value=/^\/nameY/ -- ... !-- Check which was the redirected path and include the appropriate error page -- !-- If the original url was from application X -- !--#if expr=$REDIRECT_URL=$appX -- !-- Include the app X is not running, sorry error page -- !--#include file=localApacheDirX/index.html -- !-- If the original url was from application Y -- !--#elif expr=$REDIRECT_URL=$appY -- !-- Include the app Y is not running, sorry error page -- !--#include file=localApacheDirY/index.html -- !-- Error in an application with no specific message defined -- !--#else -- !-- Include the this app is not running, sorry error page -- !--#include file=localApacheDirCommon/index.html -- !--#endif -- And that's pretty much all. Just some catches: .- In the Error pages, ALL the links have to be absolute and start with a different name than the proxied path. Otherwise you get an infinite loop between the proxied page and the error page. So make sure that nameX and localApacheDirX are ALWAYS different and that all links in localApacheDirX/index.html start with /localApacheDirX or http://. .- If inside the applications you want to get the real remote IP instead of the proxy one, then you can use, for example, the mod_proxy patch written by Bjoern Hansen which includes the original IP in an http header (X-Forwarded-For). We used it because we needed to implement IP based security restrictions, which are not defined in the JSDK spec. We also used this IP based security restrictions to prevent acces to the applications by-passing the proxy, which is very important with SSL protected applications. .- It also works with ssl. .- To improve performance, you can also use the apache proxy as proxy-cache, to get the static content faster, but then be careful not to allow it to cache the dynamic pages you don't want to be cached. And make sure you have enough disk space ;). .- We haven't specified and ErrorDocument directive for the code 500 (internal server error) because we wanted to be able to see this kind of messages, but you can put it later on to show more graceful messages. .- We use SSI to define the error hanlding page, but you could use a JSP if you wished. We just did it to have a light weight proxy with no special add ons. I hope it helps, D. Eddie wrote: Daniel, The way you do this with Apache sounds very nice. I like to know how you configure Apache to redirect to another page when something goes wrong. Could you submit a little example please ? Eddie - Original Message - From: Daniel López [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Monday, November 12, 2001 2:23 PM Subject: Re: Monitoring web apps Hi David, We don't have a sophisticated system, but it works well for us. What we do is put an Apache web server, acting as a proxy, in front of the orion server. Then, in the proxy configuration you can specify a redirect page in case something goes wrong, and we use it to redirect to a SSI script that determines which application is down and which page should be shown as an error message. This way you show automatically an error message, just by shutting down orion or by returning a 500 code from your application. I hope it helps, D. David Pérez Villanueva wrote: Hi! We have several applications running in an Orion web server. Our server is allocated in a hosting corporation. They have a program that queries our PCs with an url , calling us if there is the word 'error' (or similar) in response. What is the problem? We need something that will check our applications and will build a html page (or plain text, or anything) with the check
QL:EJB in Orion?
Is the QL:EJB part of EJB 2.0 spec supported in Orion at this point? Jonathan Bricker Lilly Research Labs Java ATG
RE: BodyTagSupport
A couple of things I noticed. 1) Your HTML does not specify the count so the body is skipped. 2) You rely on the tag engine to do your looping. While this may work if the engine is not correctly implemented then it won't. I would just do the looping in the doAfterBody. That way you have all of the body contents and you have the count. Hope this helps. -Original Message- From: Namor Taror [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 5:58 PM To: Orion-Interest Subject: BodyTagSupport Has anybody had any problems with the iterative tag execution? Even my simplest 'test' tag does not execute its body. doStartTag and doEndTag are executing fine but the doIntBody and doAfterBody are not execiting at all. taglib.tld: tag namegetCalendarList/name tagclasscom.taror.schedule.taglib.calendar.CalendarList/tagclass bodycontentjsp/bodycontent infoList.../info Class code: public class LoopTag extends BodyTagSupport { private int count; private int pos; public void setCount(int count) { this.count = count; } public int doStartTag() { if(count 0) return EVAL_BODY_TAG; else return SKIP_BODY; } public int doAfterBody() throws JspException { // Iterate until the count's up if(++pos count) return EVAL_BODY_TAG; else return SKIP_BODY; } public int doEndTag() throws JspException { pos = 0; try { if(bodyContent != null) // Check if we even entered the body bodyContent.writeOut(bodyContent.getEnclosingWriter()); } catch(java.io.IOException e) { throw new JspException(IO Error: + e.getMessage()); } return EVAL_PAGE; } } JSP: %@ page session=false % %@ taglib uri=ScheduleUtil prefix=schedule % html head titleCalendar List/title /head body table schedule:getCalendarList tr tdlksdjhg /td /tr /schedule:getCalendarList /table /body /html _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
SV: EJB in Orion?
No. -Ursprungligt meddelande-Frn: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Fr [EMAIL PROTECTED]Skickat: den 13 november 2001 14:53Till: Orion-Interestmne: QL:EJB in Orion?Is the QL:EJB part of EJB 2.0 spec supported in Orion at this point? Jonathan BrickerLilly Research LabsJava ATG
Various levels of security, how do you do it?
We are in a process of developing an application, and are looking for ways to implement security, we have the following requirements: 1. There are operations that certain members cannot perform in general 2. There are operations that certain members cannot perform relative to an object (owner vs non-owner) What are some of the mechanims that you are using to deal with these problems. I assume, in the first case you can use deployment descriptor. Also isInRole query can be made to determine if particular option should be shown to the user during the .JSP processing. The second option is a bit more difficult to implement, since a particular user can be an owner of some objects but not others. How can this requirement be implemented? Thanks. -AP_
Re: Re[2]: Urgent :: How to access JMS service from Servlet/JSP
Thank you very much. I sincerely appreciate your help. Best regards, Vani From: Sergey G. Aslanov [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: Re[2]: Urgent :: How to access JMS service from Servlet/JSP Date: Tue, 13 Nov 2001 09:52:12 +0300 VHS I think, I am also facing a similar problem. I have followed the steps you VHS have mentioned below but when I try to deploy it, it gives the following VHS error message: VHS Error instantiating application: Error loading web-app 'war-ic' at VHS D:\orion\applications\PhotonManagementConsoleApp\war-ic: Unknown VHS resource-ref tag: res-ref-type Must be res-type, not res-ref-type! ^^ VHS Can you please let me know if there are any other steps. VHS Note: I have created the ear file using ant. VHS Thanks, VHS Vani From: Kesav Kumar [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: Re: Urgent :: How to access JMS service from Servlet/JSP Date: Mon, 12 Nov 2001 01:47:03 -0800 You don't need application-client.xml if you want to access JMS from servlets. You have to write your queueconnection and queues in web.xml. Add resoure-ref entries in web.xml resource-ref res-ref-namejms/theQueueConnectionFactory/res-ref-name res-typejavax.jms.QueueConnectionFactory/res-type res-authContainer/res-auth /resource-ref resource-ref res-ref-namejms/processQueue/res-ref-name res-typejavax.jms.Queue/res-type res-authContainer/res-auth /resource-ref Once you have the resource-ref entries in web.xml from your servlet write the following Context ctx = new InitialContext(); QueueConnection con = (QueueConnection)ctx.lookup(java:comp/env/jms/theQueueConnectionFactory); Queue queue = (Queue)ctx.lookup(java:comp/env/jms/processQueue); I didn't understand your question of different containers? Do you mean different containers different orion server? If you want to get access JMS queue/connection of different orion server provide proper JNDI properties for obtaining InitialContext. Example: Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.ApplicationClientInitialContextFactory); env.put(Context.PROVIDER_URL, ormi://host/applicationname); env.put(Context.SECURITY_PRINCIPAL, username); env.put(Context.SECURITY_CREDENTIALS, password); Context ctx = new InitialContext(env); Rest of the code is common. Hope this helps you. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: How to run an existing j2ee application on orion
Herman, Thanks for your reply. You are right. There was some tag mismatch and after fixing it Orion successfully deployed the application. Thanks for your reply. Bets regards, Vani From: Herman Jansson [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: RE: How to run an existing j2ee application on orion Date: Tue, 13 Nov 2001 09:56:24 +0100 I also got an error when I deployed my ear from Sun's J2EE server but I got a pretty detailed description of what orion didnt like in the XML files. With this information I could unpack my ear and fix the XML file and succeed to redeploy it. Some SUN specific information is stored in a sun...something...xml file for each bean. I think this information is ignored by Orion!?? Though you can deploy your bean but it will use the orion default settings. A typical thing that is put in these files is the name of the data source for an entity bean. /Herman -Original Message- From: Vani H.S. [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 9:04 PM To: Orion-Interest Subject: How to run an existing j2ee application on orion Hi All, I have a J2EE application build using Sun's J2EE server. Now, I want to deploy it on Orion. But it gives me some errors. I realized that there is some Orion Specific Information that needs to be a part of the EAR. Please can anybody tell me how I should go about making the Orion Specific information part of the ear? I am building the ears using ANT 1.4. Thanks, Vani _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Using a Message Driven Bean to put in another Queue does notwork with 1.5.2 / OC4J
try putting this code in the setMessageDrivenContext() method of your mdb. On Tue, 2001-11-13 at 18:20, [EMAIL PROTECTED] wrote: We have a MDB that processes messages, we need it to put the results in ANOTHER queue. This does not work right now, as per a couple of examples I found on the web this is what we are trying public void ejbCreate() throws EJBException, CreateException { try { InitialContext context = new InitialContext(); QueueConnectionFactory conFactory = ( QueueConnectionFactory )context.lookup( CONNECTION_FACTORY ); // ^ // Create a JMS connection this.connection = conFactory.createQueueConnection(); // Create a JMS session object this.session = connection.createQueueSession( false, Session.AUTO_ACKNOWLEDGE ); // Start the connection so we can use it this.connection.start(); // Lookup a JMS queue this.searchResultsQueue = ( Queue )context.lookup( QUEUE_NAME ); // Create a JMS sender this.sender = session.createSender( this.searchResultsQueue ); } catch ( Exception e ) { // error is logged by our logging service } the line that looks up the connection factory fails if we move this to onMessage() it works, where should this go to avoid creating this on EVERY message. ejbCreate() is the CORRECT place as per all the examples and everything else. Jarrod Roberson
Re: How can I start Orion Server as a service in Windows NT/2000 ?
Dear all, I tried many ways as some of you proposed 1. Use JNT 2. Use JVMI2 3. Use RunExecSvc What I got is that I hadOrion service added to my system (as a Automatic service) but - This service does not start automatically when my computer boots up. - Even after I start it by hand successfully, the Http Server doesn'tstart withtheOrion service. (i.e. I can't get to my home page installed in my computer by typing my IP address in IE) Any one know why ??? Please give me an idea. Thanks. By the way, my system configuration is : + PIII 667MHz 128MB RAM + Win2000 Advanced Server + JDK1.3 + Orion 1.4.5 demo version. My website work fine when I start Orionmanually. Yours, Vu Le Hung - Original Message - From: Justin Crosbie To: Orion-Interest Sent: Monday, November 12, 2001 4:49 PM Subject: RE: How can I start Orion Server as a service in Windows NT/2000 ? Hi Vu, You need the JNT application from http://www.eworksmart.com/JNT/ Install this and type a command similar to the following, from where you installed Orion: jnt "/InstallAsService:Orion Application Server" "/SD[ORION_HOME]" -jar orion.jar where [ORION_HOME] is where you installed Orion. Worked for me, anyway. I had a job getting other java apps to run using this tool though :( This has come up in the list before, so do a search on the archive for more info. One thing I have noticed is that Orion runs slower this way than if you start it from a command prompt. Anyone know anything about this? I've asked this before. Cheers, Justin -Original Message-From: Vu Le Hung [mailto:[EMAIL PROTECTED]]Sent: 12 November 2001 04:38To: Orion-InterestSubject: How can I start Orion Server as a service in Windows NT/2000 ? Dear all, I'm trying to find a way to start Orion Server as a service in WindowsNT/2000( i.e.Orion will be started automatically when my computer startup without any user interaction). Any one know how to do this ? I tried this as below but it failed : 1. Write an small Win32 application "startorion.exe" that calls "java -jar orion.jar" 2. Register it as a automatic service (named MyService) with Win2000 using "Service Installation Wizard" tool in the Windows 2000 Server Resource Kit. 3. Restart my computer. Then I can find item "MyService" inthe list of all available services in my computer. But this service can not be start. Any idea ??? Thanks in advance. Vu Le Hung