OPENINFO and SesTm (session time limit)
Hi All
And thanks in advance.
We don't quite understand SesTm and it's behavior. (We have spent lots of time reading about it and still)
We have SesTm=60 (and transaction timeout set to 5 min) how come a call to the database last 10 min and only then return with "ORA-02049" ?
* "ORA-02049: timeout: distributed transaction waiting for lock"
1) Why the query didn't return after 60 sec with an error as SesTm=60 instructs ?
*May be we don't understand SesTm. (please advice)
2) Why the query didn't return after 5 min as the transaction timeout instructs ? (TMQFORWORD -t 300)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EXTRA INFORMATION (OPTIONAL) documentation of SesTm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The SesTm definition:
" SesTm=session_time_limit
Specifies the maximum number of seconds allowed in a transaction between one service and the next, or between a service and the commit or rollback of the transaction, before the system aborts the transaction. For example, SesTM=15 indicates that the session idle time limit is 15 seconds.
For example, if the TPM uses remote procedure calls between the client and the servers, then SesTM applies to the time between the completion of one RPC and the initiation of the next RPC, or the tx_commit, or the tx_rollback.
The value of 0 indicates no limit. Entering a value of 0 is strongly discouraged. It might tie up resources for a long time if something goes wrong. Also, if a child process has SesTM=0, then the SesTM setting is not effective after the parent process is terminated ."
You can read more about OPENINFO here:
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_xa.htm#i1006488
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Regards
TechSgin
Edited by: TechSgin on May 6, 2010 2:09 PM
Edited by: TechSgin on May 6, 2010 2:42 PM
Hi,
timeouts can be tricky (see other threads in this forum for some elaborations on timeouts).
To be brief, always set SesTm to a higher value than your transaction timeout. Rationale: You'll want Tuxedo to take action first, not Oracle ("behind Tuxedo's back"). If Tuxedo takes action first, the transaction will be managed more predictably if more data sources are involved.
Now it gets even more complicated. The transaction timeout value does not really specify how long something is really going to last, only how long time we're ready to wait for it until we give up. The -t 300 parameter to TMQFORWARD really means that the transaction will be forced to be rolled back unless it completes in (some) 300 seconds (it's really 300 seconds + BLOCKTIME - 1 that gives the maximum time due to rounding issues).
Just because the client (TMQFORWARD in this case) gives up waiting for a reply, the server won't necessary give up trying to produce it. In fact, it will continue to try as hard as possible to finally deliver a result. Any DML operation after the transaction timeout will most probably fail, but the server might try a lot of them (and the one causing the timeout will generally have to complete first).
If you really want to terminate long-running transactions in the server you need to specify a SVCTIMEOUT for the service(s) in question. In this case, Tuxedo will kill (using SIGINT and/or SIGKILL) any process running a service that takes too long time. In this case you better configure the server (the potential "killee") with RESTART=Y and MAXGEN=x.
Hope this helps,
/Per
Similar Messages
-
Hi,
I'm a Windows Server 2008 R2 user.
I'm looking to terminate a remoteApp session that is left idle.
I have already change the "Set Time Limit for Active but idle Remote Desktop Services Session to 1 minute" and i have also enabled "Terminate Session When time limits are reached" for both Computer Congfiguration and User Configuration.
Other Session Time Limits options are not configured.
After doing so, i did type gpupdate in the command prompt.
But whatever changes i make, doesn't have any effect on the RemoteApp.
Please to help to advice,
Thanks,
JvarmanHi,
Thank you for your post in Windows Server Forum.
As you have already configure Session Time Limit group policy, you need to apply other group policy related to RemoteApp that is “Set time limit for logoff of RemoteApp sessions”. You can specify the time limit for RemoteApp to disconnect.
The setting is under the same path which you have provided for Session Time limit.
Note: We recommend that you set other session limit policy settings that end the session to a time limit that is higher than the RemoteApp logoff delay policy setting. If this is not the case, there is a possibility for conflict.
More information:
Terminal Services RemoteApp Session Termination Logic
http://blogs.msdn.com/b/rds/archive/2007/09/28/terminal-services-remoteapp-session-termination-logic.aspx
Hope it helps!
Thanks,
Dharmesh -
Ise 1.2.1 User session time limit?
Is it possible to set a dot1x user to have a time limited session?
Scenario is a wireless PEAP client connects to a wlc controlled access point
Management wants that session to last no longer than 10 minutes and then is disconnected and not automatically reconnected.
Must use native supplicant.
I can't think of a way to fill all the requirements, anyone have ideas?Configure Session timeout over WLC
http://www.cisco.com/c/en/us/td/docs/wireless/controller/7-4/configuration/guides/consolidated/b_cg74_CONSOLIDATED/b_cg74_CONSOLIDATED_chapter_01001101.pdf -
Multipoint for Libraries - user session time limit?
We are getting a Multipoint Server system for our small local public library. We will be using this system for Public Access workstations. We would like to limit the amount of time a patron can use a workstation before the workstation is logged out. By limiting
the amount of time, we provide equitable access to all patrons. Can Multipoint Server be configured to provide auto-logoff after a certain amount of time? If not, what other solutions are there that can provide this timer feature? Optimally, we would like
the patron to be notified a few minutes before the auto logoff so he/she can save their work.We use an open source application called Cybera. It is no longer being developed, and you do need to be a bit techie to customize it the way you want it. I am running catalog computers on Multipoint 2011, and getting ready to put our internet
computers on Multipoint 2012. So far I've verified that Cybera works on Multipoint 2011. Let me know if you want more information.
Dover NH Public Library
Peggy Thrasher -
How to make an exception to RDS session Idle Time Limit?
A little bit of background:
We are running WYSE Thin Clients to connect to a RDS server farm at our company. We have set the Idle Session Time Limit to 12 hours, in Remote Desktop Session Host Configuration (in Connection --> Properties --> Sessions tab). This limit
is a site requirement.
The issue: We would like to configure a few accounts to stay logged into the RDS server indefinitely, past the 12 hour limit. How can we do this without changing the time limit for everyone?
I have tried a script to simulate mouse movements/key presses at intervals on the client session to trick RDS, but Remote Desktop Service Manager does not show that the script affects the idle time for that client. Is there another automatic way to simulate
user input to keep the client session active? What kind of hardware interrupt is RDS hooking into to determine that a human input has been pressed? A script would be the least intrusive to our infrastructure so if it is possible this is definitely preferred.
I've heard that Group Policy may be a solution here - but our local IT department do not have admin access to the Domain Controller for our site, it is managed by a third party. However, if I were to solve this using group policy, what would be the
steps? I would appreciate a step-by-step walk through if it is possible. We would have hundreds of users that need the 12 hour limit applied, and only a few that needs the infinite logon - so please keep practicality in mind.
Thanks in advance to anyone who helps.Hi,
Thank you for posting in Windows Server Forum.
In your case, I would like to suggest the steps for you. Yes, you need to take this successful via group policy.
You can create 2 group: Just for reference:
Group 1- MinLoginTime
Group 2-MaxLoginTime
Add the required users to particular group.
Users upto 12Hrs- MinLoginTime
Users above 12 Hrs- MaxLoginTime
Now need to apply group policy setting on this required groups.
Group 1- MinLoginTime:
Set time limit for active but idle Remote Desktop Services sessions-
Enable -Set 12 Hrs
End Session when time limits are reached- Enable
This is because it will disconnect the session of your users who reached to 12 hrs.
Group 2-MaxLoginTime:
Set time limit for active but idle Remote Desktop Services sessions-
Not configured\Disable
If you disable or do not configure this policy setting, this policy setting is not specified at the Group Policy level. By default, Remote Desktop Services allows sessions to remain active for an unlimited amount of time.
You can find the above setting option under below mention path.
Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits
User Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits
Note: These Group Policy settings will take precedence over the settings configured in Remote Desktop Session Host Configuration. If both the Computer Configuration and the User Configuration policy settings are configured, the Computer Configuration policy
settings take precedence.
More information:
Configure Timeout and Reconnection Settings for Remote Desktop Services Sessions
http://technet.microsoft.com/en-us/library/cc754272.aspx
Hope it helps!
Thanks.
Dharmesh Solanki -
How to process very large internal tables and stop time limit
Hello Experts,
I am currently having a problem on how to fix a certain report where we process more than 500 thousand
records in the internal table. I can't think of any solution that can make the below code any faster.
I just checked in our prod server and the error time limit exceeded stops in the loop statement. Anyway,
Below is the code. Any input will be appreciated. Thanks guys and take care!
Get sales document and corresponding line item
SELECT avbeln bposnr a~auart
avkorg avtweg a~kunnr
bmatnr bpstyv b~spart
FROM vbak AS a
INNER JOIN vbap AS b
ON avbeln = bvbeln
APPENDING TABLE lt_vbap
WHERE a~auart IN lr_auart
AND a~vbeln IN s_vbeln
AND a~vbeln IN s_vbill
AND a~vbtyp EQ p_vbtyp.
LOOP AT lt_vbap ASSIGNING <wa_vbap>.
IF <wa_vbap>-auart EQ 'ZUCI' OR
<wa_vbap>-auart EQ 'ZURV' OR
<wa_vbap>-auart EQ 'ZUPR'.
Check ifa delivery document has been created
CLEAR wa_vbill.
SELECT SINGLE vbeln
FROM vbfa
INTO wa_vbill
WHERE vbelv = <wa_vbap>-vbeln
AND ( ( vbtyp_n EQ 'J' AND vbtyp_v = 'C' )
OR ( vbtyp_n EQ 'T' AND vbtyp_v = 'H' ) ).
IF sy-subrc <> 0.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ELSE.
Check if within selection parameters
CLEAR wa_likp.
READ TABLE lt_likp INTO wa_likp WITH KEY vbeln = wa_vbill.
IF sy-subrc <> 0.
SELECT SINGLE *
FROM likp
INTO wa_likp
WHERE vbeln = wa_vbill.
APPEND wa_likp TO lt_likp.
ENDIF.
IF NOT wa_likp-wadat_ist IN s_erdat.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ENDIF.
ELSE.
Check if this has already been billed
CLEAR wa_vbill.
SELECT SINGLE vbeln
FROM vbfa
INTO wa_vbill
WHERE vbelv = <wa_vbap>-vbeln
AND ( ( vbtyp_n EQ 'M' AND vbtyp_v = 'C' )
OR ( vbtyp_n EQ 'O' AND vbtyp_v = 'H' ) ).
IF sy-subrc <> 0.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ELSE.
Check if within selection parameters
CLEAR wa_vbrk.
READ TABLE lt_vbrk INTO wa_vbrk WITH KEY vbeln = wa_vbill.
IF sy-subrc <> 0.
SELECT SINGLE vbeln fkdat
FROM vbrk
INTO wa_vbrk
WHERE vbeln = wa_vbill.
APPEND wa_vbrk TO lt_vbrk.
ENDIF.
IF NOT wa_vbrk-fkdat IN s_erdat.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ENDIF.
ENDIF.
Get Material Type and Division
IF <wa_vbap>-spart IS NOT INITIAL.
SELECT SINGLE mtart
FROM mara
INTO lv_mtart
WHERE matnr = <wa_vbap>-matnr.
ELSE.
SELECT SINGLE mtart spart
FROM mara
INTO (lv_mtart,<wa_vbap>-spart)
WHERE matnr = <wa_vbap>-matnr.
ENDIF.
If material division is same as parameter division
IF <wa_vbap>-spart = p_spart.
If material is subsidiary-owned
IF <wa_vbap>-spart in lr_spart.
If customer is the same as that of parameter division
IF <wa_vbap>-kunnr NE lr_kunnr OR <wa_vbap>-auart EQ 'ZUDO' OR <wa_vbap>-auart EQ 'ZUS3'.
If item is a free good, tag order type as 'ZUPR' to treat
the item the same way as 'ZUPR'
IF <wa_vbap>-pstyv = 'TANN' OR
<wa_vbap>-pstyv = 'ZKNF' OR
<wa_vbap>-pstyv = 'ZKNN' OR
<wa_vbap>-pstyv = 'ZFLO' OR
<wa_vbap>-pstyv = 'ZKBF' OR
<wa_vbap>-pstyv = 'ZKLN' OR
<wa_vbap>-pstyv = 'ZREN'.
lv_auart = <wa_vbap>-auart.
IF lv_auart EQ 'ZUPR'.
CLEAR <wa_vbap>-pstyv.
ENDIF.
<wa_vbap>-auart = 'ZUPR'.
CLEAR: lv_mtart.
ENDIF.
Set Cost of Goods Sold Account
<wa_vbap>-cogshkont = '0050000010'.
CASE <wa_vbap>-auart.
WHEN 'ZUPR'.
CASE lv_mtart.
WHEN 'ZUL4'.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
WHEN OTHERS.
Check if division is defined in mapping table
READ TABLE lt_ulsub INTO wa_ulsub
WITH KEY spart = <wa_vbap>-spart.
IF sy-subrc = 0.
<wa_vbap>-kostl = wa_ulsub-kostlp.
<wa_vbap>-bukrs = wa_ulsub-bukrsp.
<wa_vbap>-type = 'TP'.
Set Cost of Goods Sold Account
IF lv_auart = 'ZUPR'.
<wa_vbap>-cogshkont = '0050000006'.
ENDIF.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ENDCASE.
WHEN 'ZUCI' OR 'ZUDO' OR 'ZURD' OR 'ZUS3'.
Get cost center from header text
PERFORM get_cost_center USING <wa_vbap>-vbeln
CHANGING <wa_vbap>-kostl.
* Change by LGTE 11-02-2006
Check if Medvale sales
IF <wa_vbap>-auart EQ 'ZUCI' AND <wa_vbap>-kostl IS INITIAL.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
Check if UL Cost Center
ELSEIF <wa_vbap>-kostl NE gv_ul_kostl.
IF <wa_vbap>-kostl NE gv_ul_kostl.
* End change.
Get material division and check if subsidiary product
SELECT SINGLE spart FROM mara INTO <wa_vbap>-spart
WHERE matnr = <wa_vbap>-matnr.
READ TABLE lt_ulsub INTO wa_ulsub
WITH KEY spart = <wa_vbap>-spart.
IF sy-subrc = 0.
Get requestor's company code from cost center data
SELECT SINGLE bukrs
FROM csks
INTO <wa_vbap>-bukrs
WHERE kokrs = lc_kokrs
AND kostl = <wa_vbap>-kostl
AND datbi GE sy-datum
AND datab LE sy-datum.
IF sy-subrc = 0.
For donations, only include if a subsidiary company is donating
IF <wa_vbap>-auart EQ 'ZUDO' OR <wa_vbap>-auart EQ 'ZUS3'.
IF NOT <wa_vbap>-kunnr IN lr_kunnrnt.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
CHECK <wa_vbap>-kunnr IN lr_kunnrnt.
ENDIF.
For ZUCI, if the company code of the costcenter is UL, do not include
IF <wa_vbap>-bukrs EQ gc_ul_bukrs.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
IF <wa_vbap>-bukrs = wa_ulsub-bukrsp.
<wa_vbap>-type = 'RV'.
ELSE.
<wa_vbap>-type = 'RV'.
ENDIF.
ELSE.
Check if customer defined in table ZFI_DONATIONS
SELECT SINGLE kunnr FROM zfi_donations INTO <wa_vbap>-kostl
WHERE kunnr = <wa_vbap>-kostl.
IF sy-subrc <> 0.
lv_error = 'X'.
CONCATENATE 'Cost center/Customer' <wa_vbap>-kostl
'does not exist. Please check Sales Order'
<wa_vbap>-vbeln
INTO lt_disp-message SEPARATED BY space.
lt_disp-type = 'E'.
<wa_vbap>-del_ind = 'X'.
APPEND lt_disp.
CONTINUE.
ELSE.
<wa_vbap>-type = 'RV'.
ENDIF.
ENDIF.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
WHEN OTHERS.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDCASE.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
Get company code description
SELECT SINGLE butxt FROM t001 INTO <wa_vbap>-butxt
WHERE bukrs = <wa_vbap>-bukrs.
IF sy-subrc <> 0.
SELECT SINGLE name1 FROM kna1 INTO <wa_vbap>-butxt
WHERE kunnr = <wa_vbap>-kostl.
ENDIF.
Change by LGTE on 11-02-2006
Get Transaction Type
CASE <wa_vbap>-auart.
WHEN 'ZUPR'. "UL Promo/Samples
IF <wa_vbap>-pstyv = 'TANN' OR
<wa_vbap>-pstyv = 'ZKNF' OR
<wa_vbap>-pstyv = 'ZKNN' OR
<wa_vbap>-pstyv = 'ZFLO' OR
<wa_vbap>-pstyv = 'ZKBF' OR
<wa_vbap>-pstyv = 'ZKLN' OR
<wa_vbap>-pstyv = 'ZREN'.
<wa_vbap>-ltext = 'Free Goods'.
ELSE.
<wa_vbap>-ltext = 'Product Samples'.
ENDIF.
WHEN 'ZUDO'. "Donations - R/3
<wa_vbap>-ltext = 'Donations - R/3'.
WHEN 'ZUCI'. "Donations - ZUCI
<wa_vbap>-ltext = 'Donations - ZUCI'.
WHEN 'ZURD' OR 'ZUS3'. "UL Returns - Donation
<wa_vbap>-ltext = 'UL Returns - Donation'.
ENDCASE.
Get material description
SELECT SINGLE maktx
FROM makt
INTO <wa_vbap>-maktx
WHERE matnr = <wa_vbap>-matnr
AND spras = sy-langu.
Get division from material master
SELECT SINGLE spart FROM mara INTO <wa_vbap>-spart
WHERE matnr = <wa_vbap>-matnr.
Get division description
SELECT SINGLE vtext
FROM tspat
INTO <wa_vbap>-vtext
WHERE spras = sy-langu
AND spart = <wa_vbap>-spart.
Get Valuation Class
SELECT SINGLE bklas
FROM mbew
INTO lv_bklas
WHERE matnr = <wa_vbap>-matnr.
Determine G/L of FG Based on Valuation Class
READ TABLE lt_val_cls INTO wa_val_cls WITH TABLE KEY bklas = lv_bklas.
<wa_vbap>-fghkont = wa_val_cls-hkont.
Determine Cost Center of Cogs Account
READ TABLE lt_ulsub INTO wa_ulsub WITH TABLE KEY spart = <wa_vbap>-spart.
<wa_vbap>-cogskostl = wa_ulsub-kostlp.Hi!
First of all, don't use SELECT SINGLE inside of LOOP,
instead SELECT all relevated rows before LOOP in intertal tables (using FOR ALL ENTRIES) and then use
READ TABLE WITH KEY BINARY SEARCH.
it will match faster.
for example:
IF NOT lt_vbap[] IS INITIAL.
SELECT vbeln
FROM vbfa
INTO lt_vbill
FOR ALL ENTRIES IN lt_vbap
WHERE vbelv = lt_vbap-vbeln.
ENDIF.
SORT lt_vbap BY vbeln.
READ TABLE lt_vbill WITH KEY vbeln = <wa_vbap>-vbeln
BINARY SEARCH. -
Session Time Out For UNLOGGED IN USER During Search -pls help SIR!
Hi,
The problem lies in searchresultscontroller.java/searchcontroller.java file under search/web/handler of an application that supports educational note sharing.
The problem is that -
When I search with query strings in different fields(as you will find in the above mentioned java files)..the keywords in resourcedto and get some files as search results.
Then I click on one of the file from within the search result and visit the file.
Here if I m logged in as an user, and the session time out is set to 1 minute in the web.xml file of the web folder not the admin folder then when I hit the BACK TO SEARCH button it easily goes back to the previous search result page along with the queries string that I had input previously.
The problem is that when I m NOT LOGGED in as an user, and I've performed a search with queries and other dropdowns in the search panel, I get the search result page, I visit the file by clicking on one of them but when I hit the BACK TO SEARCH button I don't see the previous search result page from where I had navigated to view the file.
Please suggest on what changes shall I make in the code so that even if I m not logged in as an user, I get back to the search result page on hitting the BACK TO SEARCH button from the file view page.Sir I m herein pasting the code of the searchresultscontroller.java file, but please feel free to ask for anyother file whose code you might want to see.SEARCHRESULTSCONTROLLER.JAVA FILE CONTENT-
package com.mgh.sps.search.web.handler;
import java.util.Map;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
import com.mgh.sps.search.business.facade.Search;
import com.mgh.sps.common.dto.ResourceDTO;
import com.mgh.sps.common.util.SessionAttributeKey;
import com.mgh.sps.common.util.SessionManager;
import com.mgh.sps.fileusage.web.constants.FileUsageWebConstants;
public class SearchResultsController extends SimpleFormController {
* SearchResults Controller
* @author Muralikrishna.s
* @Codedondate DD-MM-YY=26-07-07
* @Usecase/s associated =UC504
private static final Logger logger = Logger
.getLogger(SearchResultsController.class.getName());
private final static String REG_EXP = "^[A-Za-z0-9]*$";
private final static Pattern EMAIL_PATTERN_REG = Pattern.compile(REG_EXP);
* Spring framework method used to hold reference data
* @param request
* HttpServletRequest
* @param command
* Object
* @param arg2
* Errors
* @return Map
* @throws Exception
@Override
protected Map referenceData(HttpServletRequest request, Object command,
Errors errors) throws Exception {
logger.debug("SearchResultsController.referenceData() method entered:"
+ request + "," + command + "," + errors);
SessionManager.setSessionAttribute(SessionAttributeKey.tabIndex,
FileUsageWebConstants.TAB_SEARCH, request);
Search search = (Search) super.getWebApplicationContext().getBean(
"searchfacade");
ResourceDTO resourceDto = (ResourceDTO) command;
String[] allValues = new String[7];
if (null != (String[]) SessionManager.getSessionAttribute(
SessionAttributeKey.allValues, request)) {
allValues = (String[]) SessionManager.getSessionAttribute(
SessionAttributeKey.allValues, request);
resourceDto.setKeywords(allValues[0]);
resourceDto.setCountry(allValues[1]);
resourceDto.setUniversityName(allValues[2]);
resourceDto.setSubjectArea(allValues[3]);
resourceDto.setQualification(allValues[4]);
resourceDto.setYearLevel(allValues[5]);
resourceDto.setSpecificType(allValues[6]);
logger.debug("%%%%%%%%%%%%%%%%%qualification%%%%%%%%%%%%%%%"
+ resourceDto.getQualification());
String flag = (String) request.getParameter("id");
resourceDto.setFlag(flag);
logger.debug("SearchResultsController.referenceData() method exited:");
return search.retrieveReferenceData(resourceDto);
* Spring framework method used to hold OnSubmit
* @param request
* HttpServletRequest
* @param response
* HttpServletResponse
* @param command
* Object
* @param arg3
* BindException
* @return ModelAndView
* @throws Exception
@Override
protected ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
throws Exception {
SessionManager.cleanup(request);
logger.debug("SearchResultsController.onSubmit() method entered:"
+ request + "," + command + "," + response + "," + errors);
Search search = (Search) super.getWebApplicationContext().getBean(
"searchfacade");
Map dynamic = (Map) getServletContext().getAttribute("config");
ResourceDTO resourceDto = (ResourceDTO) command;
SessionManager.removeSessionAttribute(SessionAttributeKey.allValues,
request);
//changed by sreelatha on sep21
//resourceDto.setKeywords(request.getParameter("keywords"));
//String key = request.getParameter("keywords");
//logger.debug("&&&&&&&&&&&&& key &&&&&&&&&&&&" + key);
String keywords = (request.getParameter("keywords"));
if(null!=keywords) {
keywords = keywords.trim();
resourceDto.setKeywords(keywords);
// changes end
resourceDto.setUniversityName(request.getParameter("universityName"));
resourceDto.setSubjectArea(request.getParameter("subjectArea"));
resourceDto.setCountry(request.getParameter("country"));
resourceDto.setQualification(request.getParameter("qualification"));
resourceDto.setYearLevel(request.getParameter("yearLevel"));
resourceDto.setSpecificType(request.getParameter("specificType"));
String[] allValues = new String[7];
//changed by sreelatha on sep21
//allValues[0] = request.getParameter("keywords");
allValues[0] = resourceDto.getKeywords();
//changes end
allValues[1] = request.getParameter("country");
allValues[2] = request.getParameter("universityName");
allValues[3] = request.getParameter("subjectArea");
allValues[4] = request.getParameter("qualification");
allValues[5] = request.getParameter("yearLevel");
allValues[6] = request.getParameter("specificType");
SessionManager.setSessionAttribute(SessionAttributeKey.allValues,
allValues, request);
if(null!=keywords) {
keywords = keywords.trim();
String words="";
for(int i=0;i<keywords.length();i++) {
String key=String.valueOf(keywords.charAt(i));
if(key.contains("*")) {
key = key.replace("*"," ");
} else if(key.contains("?")) {
key = key.replace("?"," ");
} else if(key.contains("[")) {
key = key.replace("["," ");
} else if(key.contains("{")) {
key = key.replace("{"," ");
} else if(key.contains("(")) {
key = key.replace("("," ");
} else if(key.contains(")")) {
key = key.replace(")"," ");
} else if(key.contains("+")) {
key = key.replace("+"," ");
} else if(key.contains("
key = key.replace("
} else if(key.contains(" ")) {
key = key.replace(" "," ");
} else if(key.contains("_")) {
key = key.replace("","");
} else if(!EMAIL_PATTERN_REG.matcher(key).matches()) {
key = key.replaceAll(key," ");
words = words + key;
keywords = words;
resourceDto.setKeywords(keywords);
SessionManager.setSessionAttribute(SessionAttributeKey.test, search.setInputValues(resourceDto, dynamic), request);
String name = (String) SessionManager.getSessionAttribute(SessionAttributeKey.tempName, request);
String flag1 = request.getParameter("id");
String status="";
if (flag1 !=null && flag1.equals("loggedInUser"))
if(name==null)
return new ModelAndView();
if (flag1 !=null && flag1.equals("loggedInUser")){
status = "redirect:SearchResults.htm?id=loggedInUser";
}else if(flag1 !=null && flag1.equals("nonLoggedInUser"))
status = "redirect:SearchResultsnlu.htm?id=nonLoggedInUser";
super.setSuccessView(status);
ModelAndView mav = new ModelAndView(super.getSuccessView());
logger.debug("SearchResultsController.onSubmit() method exited:");
return mav;
}Cross-posted in many forums. Don't answer this one.
-
Session Time Out For UNLOGGED USER During Search -pls help
Hi,
The problem lies in searchresultscontroller.java/searchcontroller.java file under search/web/handler of an application that supports educational note sharing.
The problem is that -
When I search with query strings in different fields(as you will find in the above mentioned java files)..the keywords in resourcedto and get some files as search results.
Then I click on one of the file from within the search result and visit the file.
Here if I m logged in as an user, and the session time out is set to 1 minute in the web.xml file of the web folder not the admin folder then when I hit the BACK TO SEARCH button it easily goes back to the previous search result page along with the queries string that I had input previously.
The problem is that when I m NOT LOGGED in as an user, and I've performed a search with queries and other dropdowns in the search panel, I get the search result page, I visit the file by clicking on one of them but when I hit the BACK TO SEARCH button I don't see the previous search result page from where I had navigated to view the file.
Please suggest on what changes shall I make in the code so that even if I m not logged in as an user, I get back to the search result page on hitting the BACK TO SEARCH button from the file view page.Sir I m herein pasting the code of the searchresultscontroller.java file, but please feel free to ask for anyother file whose code you might want to see.
SEARCHRESULTSCONTROLLER.JAVA FILE CONTENT-
package com.mgh.sps.search.web.handler;
import java.util.Map;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
import com.mgh.sps.search.business.facade.Search;
import com.mgh.sps.common.dto.ResourceDTO;
import com.mgh.sps.common.util.SessionAttributeKey;
import com.mgh.sps.common.util.SessionManager;
import com.mgh.sps.fileusage.web.constants.FileUsageWebConstants;
public class SearchResultsController extends SimpleFormController {
* SearchResults Controller
* @author Muralikrishna.s
* @Codedondate DD-MM-YY=26-07-07
* @Usecase/s associated =UC504
private static final Logger logger = Logger
.getLogger(SearchResultsController.class.getName());
private final static String REG_EXP = "^[A-Za-z0-9]*$";
private final static Pattern EMAIL_PATTERN_REG = Pattern.compile(REG_EXP);
* Spring framework method used to hold reference data
* @param request
* HttpServletRequest
* @param command
* Object
* @param arg2
* Errors
* @return Map
* @throws Exception
@Override
protected Map referenceData(HttpServletRequest request, Object command,
Errors errors) throws Exception {
logger.debug("SearchResultsController.referenceData() method entered:"
+ request + "," + command + "," + errors);
SessionManager.setSessionAttribute(SessionAttributeKey.tabIndex,
FileUsageWebConstants.TAB_SEARCH, request);
Search search = (Search) super.getWebApplicationContext().getBean(
"searchfacade");
ResourceDTO resourceDto = (ResourceDTO) command;
String[] allValues = new String[7];
if (null != (String[]) SessionManager.getSessionAttribute(
SessionAttributeKey.allValues, request)) {
allValues = (String[]) SessionManager.getSessionAttribute(
SessionAttributeKey.allValues, request);
resourceDto.setKeywords(allValues[0]);
resourceDto.setCountry(allValues[1]);
resourceDto.setUniversityName(allValues[2]);
resourceDto.setSubjectArea(allValues[3]);
resourceDto.setQualification(allValues[4]);
resourceDto.setYearLevel(allValues[5]);
resourceDto.setSpecificType(allValues[6]);
logger.debug("%%%%%%%%%%%%%%%%%qualification%%%%%%%%%%%%%%%"
+ resourceDto.getQualification());
String flag = (String) request.getParameter("id");
resourceDto.setFlag(flag);
logger.debug("SearchResultsController.referenceData() method exited:");
return search.retrieveReferenceData(resourceDto);
* Spring framework method used to hold OnSubmit
* @param request
* HttpServletRequest
* @param response
* HttpServletResponse
* @param command
* Object
* @param arg3
* BindException
* @return ModelAndView
* @throws Exception
@Override
protected ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
throws Exception {
SessionManager.cleanup(request);
logger.debug("SearchResultsController.onSubmit() method entered:"
+ request + "," + command + "," + response + "," + errors);
Search search = (Search) super.getWebApplicationContext().getBean(
"searchfacade");
Map dynamic = (Map) getServletContext().getAttribute("config");
ResourceDTO resourceDto = (ResourceDTO) command;
SessionManager.removeSessionAttribute(SessionAttributeKey.allValues,
request);
//changed by sreelatha on sep21
//resourceDto.setKeywords(request.getParameter("keywords"));
//String key = request.getParameter("keywords");
//logger.debug("&&&&&&&&&&&&& key &&&&&&&&&&&&" + key);
String keywords = (request.getParameter("keywords"));
if(null!=keywords) {
keywords = keywords.trim();
resourceDto.setKeywords(keywords);
// changes end
resourceDto.setUniversityName(request.getParameter("universityName"));
resourceDto.setSubjectArea(request.getParameter("subjectArea"));
resourceDto.setCountry(request.getParameter("country"));
resourceDto.setQualification(request.getParameter("qualification"));
resourceDto.setYearLevel(request.getParameter("yearLevel"));
resourceDto.setSpecificType(request.getParameter("specificType"));
String[] allValues = new String[7];
//changed by sreelatha on sep21
//allValues[0] = request.getParameter("keywords");
allValues[0] = resourceDto.getKeywords();
//changes end
allValues[1] = request.getParameter("country");
allValues[2] = request.getParameter("universityName");
allValues[3] = request.getParameter("subjectArea");
allValues[4] = request.getParameter("qualification");
allValues[5] = request.getParameter("yearLevel");
allValues[6] = request.getParameter("specificType");
SessionManager.setSessionAttribute(SessionAttributeKey.allValues,
allValues, request);
if(null!=keywords) {
keywords = keywords.trim();
String words="";
for(int i=0;i<keywords.length();i++) {
String key=String.valueOf(keywords.charAt(i));
if(key.contains("*")) {
key = key.replace("*"," ");
} else if(key.contains("?")) {
key = key.replace("?"," ");
} else if(key.contains("[")) {
key = key.replace("["," ");
} else if(key.contains("{")) {
key = key.replace("{"," ");
} else if(key.contains("(")) {
key = key.replace("("," ");
} else if(key.contains(")")) {
key = key.replace(")"," ");
} else if(key.contains("+")) {
key = key.replace("+"," ");
} else if(key.contains("\\")) {
key = key.replace("\\"," ");
} else if(key.contains(" ")) {
key = key.replace(" "," ");
} else if(key.contains("_")) {
key = key.replace("_","_");
} else if(!EMAIL_PATTERN_REG.matcher(key).matches()) {
key = key.replaceAll(key," ");
words = words + key;
keywords = words;
resourceDto.setKeywords(keywords);
SessionManager.setSessionAttribute(SessionAttributeKey.test, search.setInputValues(resourceDto, dynamic), request);
String name = (String) SessionManager.getSessionAttribute(SessionAttributeKey.tempName, request);
String flag1 = request.getParameter("id");
String status="";
if (flag1 !=null && flag1.equals("loggedInUser"))
if(name==null)
return new ModelAndView();
if (flag1 !=null && flag1.equals("loggedInUser")){
status = "redirect:SearchResults.htm?id=loggedInUser";
}else if(flag1 !=null && flag1.equals("nonLoggedInUser"))
status = "redirect:SearchResultsnlu.htm?id=nonLoggedInUser";
super.setSuccessView(status);
ModelAndView mav = new ModelAndView(super.getSuccessView());
logger.debug("SearchResultsController.onSubmit() method exited:");
return mav;
}Cross-posted in many forums. Don't answer this one.
-
Session time out issue in Firefox 3.0 .
I am using intranet application developed in .net framework 3.5. Users are authenticated via Windows Authentication in application.
Issues in following steps;
1) I am browsing application in one Firefox 3.0 browser. Simultaneously I am browsing some different site say google.co.uk in different instance of Firefox. Please note I am browsing google.co.uk in other Firefox browser not in different tab of same browser instance in which I am browsing my intranet application.
2) Session time out in intranet application .
3) I am starting new Firefox instance and try to open intranet site. I am again getting Session time out message.
4) I closed all of Firefox browsers (2 instances)
5) Start again a new browser and try to open intranet application.
6) It is successfully opend.
Now the pain is why I need to close all other Firefox browsers in case of session time out in one browser .Similar issue I was getting in IE 8 but they have feature like Open site with a new session .
It would be nice if you can help in getting rid of this issue
== This happened ==
Every time Firefox opened
== User Agent ==
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)Hi Rohit,
If you want to increase Session time : increase time in web.xml in min
<session-config>
<session-timeout>30</session-timeout>
</session-config>
and after session time out if you want to re-login to webshop then
do following settings in XCM.
url : http://<host>:<port>/b2b/admin/xcm/init.do
goto -> General Application settings -> b2b -> b2bconfig.
For reloginurl.core: value : ../init.do
note: after session expire if your application is redirecting to https:<port>:<host>/....
Then
set SSLEnabled: as false
Restart your application
Hope this works.
Regards,
Devender
Edited by: devender on Jul 12, 2010 5:01 PM -
Time Limit exceeded Error while updating huge number of records in MARC
Hi experts,
I have a interface requirement in which third party system will send a big file say.. 3 to 4MB file into SAP. in proxy we
used BAPI BAPI_MATERIAL_SAVEDATA to save the material/plant data. Now, because of huge amount of data the SAP Queues are
getting blocked and causing the time limit exceeded issues. As the BAPI can update single material at time, it will be called as many materials
as we want to update.
Below is the part of code in my proxy
Call the BAPI update the safety stock Value.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = gs_headdata
CLIENTDATA =
CLIENTDATAX =
plantdata = gs_plantdata
plantdatax = gs_plantdatax
IMPORTING
return = ls_return.
IF ls_return-type <> 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
MOVE ls_return-message TO lv_message.
Populate the error table and process next record.
CALL METHOD me->populate_error
EXPORTING
message = lv_message.
CONTINUE.
ENDIF.
Can any one please let me know what could be the best possible approach for this issue.
Thanks in Advance,
Jitender
Hi experts,
I have a interface requirement in which third party system will send a big file say.. 3 to 4MB file into SAP. in proxy we
used BAPI BAPI_MATERIAL_SAVEDATA to save the material/plant data. Now, because of huge amount of data the SAP Queues are
getting blocked and causing the time limit exceeded issues. As the BAPI can update single material at time, it will be called as many materials
as we want to update.
Below is the part of code in my proxy
Call the BAPI update the safety stock Value.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = gs_headdata
CLIENTDATA =
CLIENTDATAX =
plantdata = gs_plantdata
plantdatax = gs_plantdatax
IMPORTING
return = ls_return.
IF ls_return-type <> 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
MOVE ls_return-message TO lv_message.
Populate the error table and process next record.
CALL METHOD me->populate_error
EXPORTING
message = lv_message.
CONTINUE.
ENDIF.
Can any one please let me know what could be the best possible approach for this issue.
Thanks in Advance,
JitenderHi Raju,
Use the following routine to get fiscal year/period using calday.
*Data definition:
DATA: l_Arg1 TYPE RSFISCPER ,
l_Arg2 TYPE RSFO_DATE ,
l_Arg3 TYPE T009B-PERIV .
*Calculation:
l_Arg2 = TRAN_STRUCTURE-POST_DATE. (<b> This is the date that u have to give</b>)
l_Arg3 = 'V3'.
CALL METHOD CL_RSAR_FUNCTION=>DATE_FISCPER(
EXPORTING I_DATE = l_Arg2
I_PER = l_Arg3
IMPORTING E_FISCPER = l_Arg1 ).
RESULT = l_Arg1 .
Hope it will sove ur problem....!
Please Assign points.......
Best Regards,
SG -
Dear support,
i have windows 2003 server,
i need RDP idle session time limit in this server .
Regards,
KrishnaHi,
I would like to check if you need further assistance.
Thanks.
Jeremy Wu
TechNet Community Support -
SSO Partner Application and Session Time out
Hi ,
We have an application on forums.oracle.com which is implementing the Authentication scheme as SSO, that is working well, now we want to implement Session Time out if the user is idle for some time and ask him to login again after the session fails, I have tried to implement this feature as given by Scott in the thread session timeout , well the problem is since we dont have a login page here how do we set the cookies owa_cookie.send(
name => 'HTMLDB_IDLE_SESSION',
value => to_char(sysdate+(20/1440),'DD-MON-YYYY HH24:MI:SS'),
expires => null,
path => '/',
domain => null
and where is the current point to implement it.
Any help on this is greatly welcome.
Thanks in Advance.Naveen,
I don't remember how the solution works. But if you don't have a login page you can usually put code in the post-authentication process of your authentication scheme to do whatever the login page process would have done.
Scott -
Session Time out and session_timeout.jsp
We have Sun Java Identity Server 2005 Q1 installed as part of our Sun Java System Portal Server 2005 Q1 install.
When the authentication session times out, it redirects the user back to the login page. I remember that in 6.2 it used to show up the session_timeout.jsp page? Is there any way to make it work that way in Q1 2005 ?To be more specific, find your top level desktop display profile (marked as Default Channel Name) container name. Then go to Portal desktop type (default, or sampleportal, or...) with above container directory. (ex: /etc/opt/SUNSWps/desktop/default/JSPTabContainer) Modify header.jsp and/or menubar.jsp (something ...?action=logout with goto=http:///.....) HTH, Jerry
-
Session time-out and password security
Hi,
I have a webservice utility, deployed on several platforms (as an EAR on weblogic and webspere, as a WAR on tomcat), they all exhibit the same feature: on first connection, a username/password box pops up, but after the session times out (after 20 minutes or so of inactivity) and the it receives a new page request, instead of re-asking for the username/password, the app just jumps back to its own start page, and then continues without asking.
How can I make it to pop-up the username/password box again?
The security is implemented through the web.xml file:
<security-constraint>
<web-resource-collection>
<web-resource-name>Success</web-resource-name>
<url-pattern>/Logparser</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>webuser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>default</realm-name>
</login-config>
<security-role>
<role-name>webuser</role-name>
</security-role>I found that this in itself was not good enough security as you would be able to go directly to one of the sub-pages (if you know the url), and to prevent that I pass (and check) the session-id with each page request.
(all java servlets).
Obviously something is missing, but I don't know what
thanks
MichaelHi Michael,
Your web application is currently configured to use BASIC authentication.
Instead if you use FORM-based authentication, then any new request (after your web application session times out) will be redirected to the login page. The Servlet specification has more information about FORM-based login.
If you have a Sun ONE Web Server 6.1 or a Sun Java System Web Server 7.0 installation you can find a sample that uses form-login in the following directory
6.1: <install-directory>/plugins/java/samples/webapps/security/form-auth
7.0: <install-directory>/samples/java/webapps/security/form-auth -
Session time out and automatic log off
hi,
I have been using JSC for a while but I am not JSC guru.
I want to implement automatic logoff when the session timesout. I know that I can set session time out in tomat web.xml file. but I cant understand how to check if the session time is out and logOff the user.
When user logs in, username is stored in the database, so when the user logoff the username has to be deleted from the database and he should be redirected to the login page. I want all this to be done automatically when session times out(i.e if the user is inactive for specified amount of time).
Any help is greatly appreciated. Please reply ASAP, i need to get this working by tommorow.
chees
satishI think you might find this thread interesting:
http://swforum.sun.com/jive/thread.jspa?threadID=50520&messageID=183099
Maybe you are looking for
-
How to show icon in a column of a table?
How to display an icon in a column of a table UI element and this icon is to be displayed based on values in the table row?
-
Hide a column in one table view but show it in another
I need to hide a column in one tables view but show it in another table view in the same report. Is this possible? Any help on this is appreciated. Edited by: VNC on Jan 11, 2010 9:26 AM
-
Hard drives damaged after installing Snow Leopard :(
After installing Snow Leopard all software seemed to work fine. Then I found out that e-sata doesn't seem to work well with Snow. I've tried two different e-sata cards, including CalDigit's FASTA-2e, which CalDigit claims works fine with 10.6. My ext
-
Application crashes on IOS 5.1 (tried Adhoc export release build)
Application crashes on IOS 5.1 in splash screen. It works fine with fast debugging and standard debugging.But when i tried to test in as ADHOC release build it got crashed. Device: Ipad 2 - IOS 5.5 Air: Air 3.3 beta 2 Flex sdk: 4.6 -Saravanan.
-
Asset report with asset quanity
Hi, We create the asset master in asset master we are not entering the quanity in asset master after thta we create the PO for asset using the asset code then we complte the PO to invoice cycle after this we can see the asset balance in the all the