SV: When user hits STOP..any way to trap that and terminate an ongoin g request..
Just keep the users state server side and you're home. WR -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]För Aaron Tavistock Skickat: den 14 augusti 2001 02:50 Till: Orion-Interest Ämne: RE: When user hits STOP..any way to trap that and terminate an ongoin g request.. This is a fairly classic web issue and unfortunately there is simply no way to tell if the client has hit the stop button. No matter what happens your going to be stuck running that long query no way out... But on the resubmit issue and using the session to flag a large transaction, I would worry about this alot. For one, what if the user really didn't want that massive query, now they are being penalized until their query is completed. Personally I think the Jakarta Struts folks came up with a fairly decent way of curbing reposters. Basically they add a hidden field to every form with a unique token, that token is recorded when the form is submitted, and thereafter the same form will not be accepted. So the user can't just hit back and then OK, but they can go through the normal route to search again. -Original Message- From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] Sent: Monday, August 13, 2001 1:23 PM To: Orion-Interest Subject: When user hits STOP..any way to trap that and terminate an ongoin g request.. Hi al, I am almost positive the answer is no, but I thought I'd see if anyone has come up with a solution. All too often, we have some users that submit a large query, then hit the STOP button on the browser, then change something and submit again. In the meantime, their original query is still executing on the server-side. Sure..Orion throws an exception when it tries to send the response back and the connection to the browser is gone. But I am wondering if there is any way at all to just kill that particular request. Like..is there some way the app server or web server can send pings every say, 100ms to the browser to make sure its connection is still alive..and if not, just kill the request in some manner. Perhaps by having a special interface that an application can implement, so that a particular method can be called if the server detects that the connection to the browser is dead before the response has gone back. In this way, that method call can get ahold of the session, and perhaps get ahold of a connection being used, close it, etc. Ofcourse, you can use some client-side javascript to disable a button after its been clicked. We have done this, and we also inserted a transition page in particular areas where long queries might occur. In this case, the user sees an animated gif and a message that tells them not to hit stop or back. Ofcourse..you're still going to get those users that do this. My personal opinion is that if they call in, we tell them they are stupid, they should unplug their computer and quit their job because they can't follow instructions. Ofcourse..that wont fly, especially if they are a big money client. Besides, its ethically wrong to screw your clients over. ;) So, one possible idea I have had is to do the following. Each user has a session when they log in. Upon any request, a flag is set in the session of that user, indicating a transaction is starting. If the user hits STOP, then submits while that transaction is still going on, the server will see the flag is set, and send back a response indicating that a transaction is currently happening and they have to wait for it to be done before another submit can occur. There is a plus side to this..it prevents any user to doing more than one thing. The down side is, it is possible using the File - New - Window to open up another window with the same cookie/sessionID and the user could actually go to a different module and do MORE work at the same time. This would allow, for example a large query to be performing in one module and they could go do some work in another module. My method of a flag would prevent this type of multiple-module capability. The solution, ofcourse is to allow one flag per module, thus only one transaction per module could be performed, which is what I intend to implement to at least keep the user experience at a satisfactory level while preventing tons of form submissions from inundating the server. So anyone had this experience and resolve it in some manner? Thanks.
Re: how to unsubscribe.
[EMAIL PROTECTED] wrote: would somebody tell me how to unsubscribe to this group. tried but failed. How to write a message to this group. Tried but failed. Did not receive any warning. Or does it simply take very long? Michie -- Michiel Meeuwissen - NOS internet Mediacentrum kamer 203 - tel. +31 (0)35 6773065 http://www.mmbase.org http://www.purl.org/NET/mihxil/
RE: When user hits STOP..any way to trap that and terminate an ongoin g request..
You make it sound so simple..yet its not quite that easy. I do keep the state of the user on the server, of course. But that still wont prevent the user from stopping a query that could potentially take a long time, then submitting again, while the original one is still going on. I would love for you to explain to me what you mean, and how it works, because frankly your reply was a little vague for me to come up with a resolution out of. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus Rydin Sent: Wednesday, August 15, 2001 11:23 PM To: Orion-Interest Subject: SV: When user hits STOP..any way to trap that and terminate an ongoin g request.. Just keep the users state server side and you're home. WR -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]För Aaron Tavistock Skickat: den 14 augusti 2001 02:50 Till: Orion-Interest Ämne: RE: When user hits STOP..any way to trap that and terminate an ongoin g request.. This is a fairly classic web issue and unfortunately there is simply no way to tell if the client has hit the stop button. No matter what happens your going to be stuck running that long query no way out... But on the resubmit issue and using the session to flag a large transaction, I would worry about this alot. For one, what if the user really didn't want that massive query, now they are being penalized until their query is completed. Personally I think the Jakarta Struts folks came up with a fairly decent way of curbing reposters. Basically they add a hidden field to every form with a unique token, that token is recorded when the form is submitted, and thereafter the same form will not be accepted. So the user can't just hit back and then OK, but they can go through the normal route to search again. -Original Message- From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] Sent: Monday, August 13, 2001 1:23 PM To: Orion-Interest Subject: When user hits STOP..any way to trap that and terminate an ongoin g request.. Hi al, I am almost positive the answer is no, but I thought I'd see if anyone has come up with a solution. All too often, we have some users that submit a large query, then hit the STOP button on the browser, then change something and submit again. In the meantime, their original query is still executing on the server-side. Sure..Orion throws an exception when it tries to send the response back and the connection to the browser is gone. But I am wondering if there is any way at all to just kill that particular request. Like..is there some way the app server or web server can send pings every say, 100ms to the browser to make sure its connection is still alive..and if not, just kill the request in some manner. Perhaps by having a special interface that an application can implement, so that a particular method can be called if the server detects that the connection to the browser is dead before the response has gone back. In this way, that method call can get ahold of the session, and perhaps get ahold of a connection being used, close it, etc. Ofcourse, you can use some client-side javascript to disable a button after its been clicked. We have done this, and we also inserted a transition page in particular areas where long queries might occur. In this case, the user sees an animated gif and a message that tells them not to hit stop or back. Ofcourse..you're still going to get those users that do this. My personal opinion is that if they call in, we tell them they are stupid, they should unplug their computer and quit their job because they can't follow instructions. Ofcourse..that wont fly, especially if they are a big money client. Besides, its ethically wrong to screw your clients over. ;) So, one possible idea I have had is to do the following. Each user has a session when they log in. Upon any request, a flag is set in the session of that user, indicating a transaction is starting. If the user hits STOP, then submits while that transaction is still going on, the server will see the flag is set, and send back a response indicating that a transaction is currently happening and they have to wait for it to be done before another submit can occur. There is a plus side to this..it prevents any user to doing more than one thing. The down side is, it is possible using the File - New - Window to open up another window with the same cookie/sessionID and the user could actually go to a different module and do MORE work at the same time. This would allow, for example a large query to be performing in one module and they could go do some work in another module. My method of a flag would prevent this type of multiple-module capability. The solution, ofcourse is to allow one flag per module, thus only one transaction per module could be performed, which is what I intend to implement to at least keep
URGENT: serious clustering bug?
I'm doing some tests on the http clustering feature of Orion. Following the getting started documentation I was able to setup an island with two OC4J servers and a loadbalancer. For testing I used the SessionServlet who increase (any time you call it) an Integer variable in the HttpSession (counter). All works fine up to about a counter value of 80. After that you get a java.lang.ClassCastException due to the fact that the object returned from the HttpSession is no more an Integer (from a modified version of the servlet I discovered I get [B as the class of the object returned). Tested on WindowsNT and Linux with sun JDK 1.3.1 To reproduce the error I discovered isn't necessary to setup a real cluster, but you only need to add a cluster-config/ in the orion-web.xml and load the SessionServlet. Anyone alse experienced this problem? If so I'll submit the bug to Bugzilla. Luciano
Finding an entity in a Collection returned by findAll()
Ok..still new to this EJB thing. Got my entity bean stored in the hSQL table, I am able to iterate over the Collection returned by the findAll() method. Now the question is, how do I find my one object? More specifically, I created a simple entity that has a name (primary key), login, and password. I added a couple of items to the table. Now, like I said I can see all the items added..so they are being stored. Now I want to search for the login and password that someone types in. I see the findByPrimaryKey() method, which would find one item via the primary key of name. But how do I search by the login and password for one item to see if it exists, or by those fields to get say..a series of items with the same criteria (for example, all rows that contain the same login name..assuming its not a not null column which if I am correct, CMP only makes NOT NULL out of primary keys). Thanks.
RE: deploying a war file
Sure. First..I will assume your dir is correctly formatted (that is, web-app dir, WEB-INF/classes, WEB-INF/lib, WEB/INF/web.xml, and what ever classes, lib files, jsp, html, images, etc). So I am assuming you have the .war file. Now, I don't deploy in the Orion install dir. So I set up my own folder outside. Lets call this c:\myapps. So I have this: c:\myapps\META-INF\application.xml c:\myapps\myapp\www\WEB-INF c:\myapps\myapp\www\WEB-INF\classes c:\myapps\myapp\www\WEB-INF\lib c:\myapps\myapp\www\WEB-INF\web.xml In the /orion/config/server.xml file add this at the end: application name="myapp" path="c:\myapps\myapp" / web-site path="./myapp.xml"/ In the /orion/config/myapp.xml file you'll have: ?xml version="1.0"?!DOCTYPE web-site PUBLIC "Orion Web-site" "http://www.orionserver.com/dtds/web-site.dtd" web-site host="[ALL]" port="80" display-name="My Web Site"default-web-app application="myapp" name="www" / access-log path="../log/myapp-web-access.log" //web-site Finally, in the c:\myapps\META-INF\application.xml file, you'll have: ?xml version="1.0"?!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd" application display-nameMy App/display-name module web web-uriwww.war/web-uri context-root//context-root /web /module security-role role-nameadministrators/role-name /security-role security-role role-nameusers/role-name /security-role/application As far as I know..this is all you need to do. There is one thing I have to explain. In the above application.xml, you'll see that it says www.war. This would be located in the c:\myapps\myapp\www.war But also notice that the www.war has the same name as the www dir in the myapp dir. This isn't necessary..just what I do. I generally give the same name to the war file as the dir name the web-app is in. This way, I can change the application.xml file above like so: module web web-uriwww/web-uri context-root//context-root /web /module This little change will now allow me to use the myapp\www folder in expanded form for development purposes. With Orion, if you turn on the development="true", your WEB-INF\classes\*.class files will auto-reload if any changes to the corresponding .java files occur while you edit. I think you have to specify the source dir too for that to work. What I do, instead, is use ANT to do all my builds and the last target in the build.xml file is touch file="c:\myapps\myapp\META-INF\application.xml"/ which Orion notices and auto-reloads the application. Just make sure ALL classes that may be stored as attributes in the HttpSession implement Serializable correctly including having the static final long serialVersionUID = L; in it! Got any questions..feel free to ask. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of John MillerSent: Thursday, August 16, 2001 12:31 AMTo: Orion-InterestSubject: deploying a war file Has anyone done this in Orion before? If so could you tell me how. Any advice, tips, info would be appreciated. Regards, Johnny http://www.iii.co.uk Interactive Investor International is a leading UK Internet personal finance service that provides individuals with the capability to identify, compare, monitor and buy online a number of financial products and services. Interactive Investor Trading Limited, a subsidiary of Interactive Investor International plc, is regulated by the SFA.
RE: URGENT: serious clustering bug?
Hi all, In my previoous post where you read OC4J read Orion 1.5.2 and getting started documentation is http-clustering.html. Sorry :) Submitted in bugzilla as bug 590. However the problem exists also in the Oracle version derived from Orion (OC4J). Luciano -Original Message- From: Montebove Luciano [mailto:[EMAIL PROTECTED]] Sent: giovedì 16 agosto 2001 10.22 To: Orion-Interest Subject: URGENT: serious clustering bug? I'm doing some tests on the http clustering feature of Orion. Following the getting started documentation I was able to setup an island with two OC4J servers and a loadbalancer. For testing I used the SessionServlet who increase (any time you call it) an Integer variable in the HttpSession (counter). All works fine up to about a counter value of 80. After that you get a java.lang.ClassCastException due to the fact that the object returned from the HttpSession is no more an Integer (from a modified version of the servlet I discovered I get [B as the class of the object returned). Tested on WindowsNT and Linux with sun JDK 1.3.1 To reproduce the error I discovered isn't necessary to setup a real cluster, but you only need to add a cluster-config/ in the orion-web.xml and load the SessionServlet. Anyone alse experienced this problem? If so I'll submit the bug to Bugzilla. Luciano
Re: deploying a war file
See www.orionsupport.com, which details this pretty plainly. On Thu, 16 Aug 2001, John Miller wrote: Has anyone done this in Orion before? If so could you tell me how. Any advice, tips, info would be appreciated. Regards, Johnny http://www.iii.co.uk Interactive Investor International is a leading UK Internet personal finance service that provides individuals with the capability to identify, compare, monitor and buy online a number of financial products and services. Interactive Investor Trading Limited, a subsidiary of Interactive Investor International plc, is regulated by the SFA. --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
FW: When user hits STOP..any way to trap that and terminate an ongoin g request..
3rd Repost -Original Message- From: Andre Vanha Sent: Monday, August 13, 2001 6:27 PM To: 'Orion-Interest' Subject: RE: When user hits STOP..any way to trap that and terminate an ongoin g request.. Hi Kevin, although as you describe there isn't any way to notify the server when a user hit's the stop button, I thought of a possible solution. Since the only indication of an aborted request is a closed connection there must be a way to monitor for this event. You mention you use a transition page, which could be used to implement this. Theoretically it could be done like this: A user submits a large query to your server. Your server sends back the transition page, but not all of it.On the server the query is dispatched and processing starts. Either your query process could periodically make calls to some sort of update method, or your query process could be spawned in a new thread, and the servlet thread would periodically check the status of the query thread. Whenever the isAlive check would occurr you could attempt to send something to the client browser. If you receive an error during the send process, you can assume the user has either pressed the stop button, or navigated to a different page, and kill your query processing. If the query completes successfully while the user is waiting, you can either send the results directly, or send a redirect to a page where the results can be viewed. There are several things you could send to the client browser during your isAlive check. For simplicity, you could send dots .. If your query job supports it, you could send progress updates 10% CompleteBR, 20% CompleteBR etc... For fancy effects, you could send javascript that could swap an image on the page to simualte a graphical progress bar or some other effect. This solution will impose more overhead on the server, since response caching would have to be turned off, and there might be other issues, but it might do what you need. Andre -Original Message- From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] Sent: Monday, August 13, 2001 2:23 PM To: Orion-Interest Subject: When user hits STOP..any way to trap that and terminate an ongoin g request.. Hi al, I am almost positive the answer is no, but I thought I'd see if anyone has come up with a solution. All too often, we have some users that submit a large query, then hit the STOP button on the browser, then change something and submit again. In the meantime, their original query is still executing on the server-side. Sure..Orion throws an exception when it tries to send the response back and the connection to the browser is gone. But I am wondering if there is any way at all to just kill that particular request. Like..is there some way the app server or web server can send pings every say, 100ms to the browser to make sure its connection is still alive..and if not, just kill the request in some manner. Perhaps by having a special interface that an application can implement, so that a particular method can be called if the server detects that the connection to the browser is dead before the response has gone back. In this way, that method call can get ahold of the session, and perhaps get ahold of a connection being used, close it, etc. Ofcourse, you can use some client-side javascript to disable a button after its been clicked. We have done this, and we also inserted a transition page in particular areas where long queries might occur. In this case, the user sees an animated gif and a message that tells them not to hit stop or back. Ofcourse..you're still going to get those users that do this. My personal opinion is that if they call in, we tell them they are stupid, they should unplug their computer and quit their job because they can't follow instructions. Ofcourse..that wont fly, especially if they are a big money client. Besides, its ethically wrong to screw your clients over. ;) So, one possible idea I have had is to do the following. Each user has a session when they log in. Upon any request, a flag is set in the session of that user, indicating a transaction is starting. If the user hits STOP, then submits while that transaction is still going on, the server will see the flag is set, and send back a response indicating that a transaction is currently happening and they have to wait for it to be done before another submit can occur. There is a plus side to this..it prevents any user to doing more than one thing. The down side is, it is possible using the File - New - Window to open up another window with the same cookie/sessionID and the user could actually go to a different module and do MORE work at the same time. This would allow, for example a large query to be performing in one module and they could go do some work in another module. My method of a flag would prevent this type of multiple-module capability. The solution, ofcourse is to allow one flag per module, thus only one transaction per
method without waiting ??
Title: SV: Roll-BACK question. Hellu there, Some advice on the following please: I have a servlet that calls a EJB method. I don't want that the servlet waits before the EJB method returns. How do I do this ?? I know that JMS is a good solution for these kind of things, but this is to much work I think as I already have a 'good' working situation, so I think this results in too much changes. I am thinking about starting a thread and calling the EJB method in this thread, but I am not sure if this is the best way to solve this ? Please some help on this ? Eddie
Fw: CMP
I have created a few CMP beans that access our Oracle 8i database (with Secure Access Control enabled, provides row level security). The problem we have is that we have to use a data-source with a set user/password(principal/credentials). We would like to use a CMP bean where we can specify the user and password dynamically, but don't see how we can do it. Do you know if this is possible? It is certainly possible with a BMP, but we'd like to take advantage of using CMP when we can. Thank you for any input, Theresa Duffy
Apache - OC4J frontend configuration
Hi all. We're trying to set up apache in front of the oc4j . While this works fine on the same host we encounter problem when we put each on it's own machine. In our JSPs we write : headBASE href="%= HttpUtils.getRequestURL(request) %" /head This is done for the images will not be related to the jsp/servlet and to be served by the Apache alone. Since this code is run in the oc4j it gives http://oc4j-host:oc4j-port/ To over come it we use the frontendtag in the default-web-site.xml file. However this works only for the same host - changing the port from oc4j to the apache port http://myhost/ instead of http://myhost:/... But when we put a different host name in the frontend tag it simply ignore it and gives http://myhost:/... Is that a kwon bug ? Is there is any work around ? Thanks Shlomo RothschildC.T.ODCTech[EMAIL PROTECTED]972-8-6739133 Phone972-54-418115 Mobile
ejb.dfPackage ejb.dfPackage.wmf
Anybody knows the role these files play (they are in the ATM example, com/acme/atm/ejb in atm-ejb) - what are they for, where do I find info (e.g. about format), and how is the *.wmf file created? Cheers --peter
Re: Finding an entity in a Collection returned by findAll()
You need EJB-QL. With EJB-QL you can specify the SQL like queires which gives all the objects that match the query. Example: in your home have a method like this. public java util.Collection findMatchPassword(String passwd) throws FinderException, RemoteException In your deployment descriptor write query like the following SELECT OBJECT(o) FROM Users WHERE password =? Here the Users is the abstract-schma-name for the entity bean and password is cmp-field. You can write much more complex queries using EJB-QL with cmp relationships. - Original Message - From: Kevin Duffey [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 2:20 AM Subject: Finding an entity in a Collection returned by findAll() Ok..still new to this EJB thing. Got my entity bean stored in the hSQL table, I am able to iterate over the Collection returned by the findAll() method. Now the question is, how do I find my one object? More specifically, I created a simple entity that has a name (primary key), login, and password. I added a couple of items to the table. Now, like I said I can see all the items added..so they are being stored. Now I want to search for the login and password that someone types in. I see the findByPrimaryKey() method, which would find one item via the primary key of name. But how do I search by the login and password for one item to see if it exists, or by those fields to get say..a series of items with the same criteria (for example, all rows that contain the same login name..assuming its not a not null column which if I am correct, CMP only makes NOT NULL out of primary keys). Thanks.
RE: ejb.dfPackage ejb.dfPackage.wmf
They are files generated by Together, a A multi-platform UML modeler that supports round-trip engineering for Java and C++.. I think the URL for the company is http://www.togethersoft.com. They are just the model/diagram files. -jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of SAURUGGER,PETER (A-PaloAlto,ex2) Sent: Thursday, August 16, 2001 12:50 PM To: Orion-Interest Subject: ejb.dfPackage ejb.dfPackage.wmf Anybody knows the role these files play (they are in the ATM example, com/acme/atm/ejb in atm-ejb) - what are they for, where do I find info (e.g. about format), and how is the *.wmf file created? Cheers --peter