One Session in Forms5.0 Applications

Hello,
I want to restrict user that user can not open two session for
the Forms Application.
For the same I am using Forms 5.0 And I have written the
following code in WHEN-NEW-FORM-INSTANCE Trigger but it is not
working properly.
So How can I restrict the user for the same.
DECLARE
ln_response BOOLEAN;
BEGIN
ln_response :=
Win_Api_Session.One_Session('HELLO','ONE_SES','MODULE',FALSE,WIN_
API.D2K_WINDOW_CLASS,TRUE);
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXIT_FORM;
END;
Thanks for any help.
null

Pradeep Rajput (guest) wrote:
: Hello,
: I want to restrict user that user can not open two session
for
: the Forms Application.
: For the same I am using Forms 5.0 And I have written the
: following code in WHEN-NEW-FORM-INSTANCE Trigger but it is not
: working properly.
: So How can I restrict the user for the same.
: DECLARE
: ln_response BOOLEAN;
: BEGIN
: ln_response :=
: Win_Api_Session.One_Session
('HELLO','ONE_SES','MODULE',FALSE,WIN_
: API.D2K_WINDOW_CLASS,TRUE);
: EXCEPTION
: WHEN NO_DATA_FOUND THEN
: EXIT_FORM;
: END;
: Thanks for any help.
Hi!
Try the following:
1. Delete all copies of D2KWUTIL.PLL and D2KWUT32.DLL.
2. Copy the above files from Developer/2000 Version 2.1
CD\EXTRAS\D2KWUTIL.
3. Write the following code in WHEN-NEW-FORM-INSTANCE Trigger:
Set_Window_Property(FORMS_MDI_WINDOW, TITLE, 'HELLO');
IF win_api_session.one_session('HELLO',
'F50RUN32.EXE',
'WINDOW',
TRUE,
WIN_API.WINCLASS_DEVELOPER_2000_V2,
FALSE) THEN
EXIT_FORM;
END IF;
That's all. It works well and I tested in both Windows 95 and
Windows NT Workstation.
Good Luck!
null

Similar Messages

  • How to limit number of sessions for an Application

    Hi,
    I have an ASO application running on Essbase 7.1.5 version.
    This Essbase cube is widely used by the BO ( business objects ) Web I services for retrieving data in there Dash Boards.
    No I want to restrict number of sessions on this application. We have SERVERTHREADS through which we can set limit on application wise.
    SERVERTHREADS [application] 20;
    When I set this in the Essbase config file on this server and bounce the Essbase services. Will this really help me in limiting the session till 20 for this application . I see we can set minimum 20 and maximum 500 using server threads.
    What will happen to the session which excceds 20. will they be kept in queue ?.
    Pls let me know if this work. Else pls suggest me the best one.
    Some information for you – in the Essbase ->properties->statistics-> I see Ports Available are 65531
    Thanks
    MS

    HI,
    1. SERVERTHREADS does not contain/limit the count of sessions one can have .
    2. Count of ports will help you decide what is the default SERVERTHREAD count , in your case its 20.
    3. the count 20 signifies the number of threads which a transaction can use ( here threads are nothing by the operating system level threads, to do with the processes and processor).
    4. If you have multiple transactions and you want to improve the performance of them ( in case of slow response or so). You can increase the thread count , to make more threads work for your transactions. Again , this does not limit the count of sessions .
    5. I did not understand the obejctive behind limiting the sessions and avoiding users from accessing . I think , this defeats the whole purpose of having cubes then. You have many cubes ,and huge number of users who pull data and essbase and its kernel are capable of handling this . If you still want to restrcit, might as well set their security ( by letting them not to access cubes).
    Hope this adds value
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • Sessions across Web Applications (WARs)

    I've heard that you can't share session information (http session) across web applications or war files in the j2ee framework. However, I haven't seen any proof of this? I'm struggling to find information telling that I can't do this. Can someone elaborate a bit?
    Thanks.

    Hi !
    It is TOTALLY WRONG that someone wrote here that a
    separate JVM is started for each web-app! No way. Run
    any appserver and do a 'ps -ef|grep java' and I bet
    you will see only one forever :-). Correct
    Steve, it is the classloader hierarchy in all
    appservers that prevents you from sharing sessions (i
    would say classes loaded by various web-apps). There
    is something called a web-app / WAR classloader, which
    is 4th in the hierarchy of JVm classloader hierarchy.
    Since all your web-app loaded classes are loaded by
    this classloader and since each web-app has a "peer"
    classloader at same level for its own web-app, you
    will never be able to share across web-apps. Incorrect, just because you can have separate classloaders for separate web applications does not mean that those web applications cannot share instances.
    It is also possible to have classes which are globally available to ALL web applications which are loaded as part of the servlet container. Tomcat versions 4+ have a common area where classes can be made available. These classes are not loaded within the Web Application classloader at all.
    Not only that but it is possible to configure web application contexts such that they can also share things like sessions. This feature is definitely part of the Apache Tomcat release and as this is taken by Sun to be the Reference Implementation of the Servlet Container I would assume that is also part of the J2EE Standard as well.
    YOu can always use the DB stuff that other genltmen
    has already suggested.

  • OracleConnection opening more than one session.

    Hi,
    I am using ODP.NET 10.2 client, when i try to connect to Oracle database using OracleConnection object it is creating more than one session object.
    I created one windows application, then i added the below code in form load event of the application
    Please find the below code
    string strConnection1 = "Persist Security Info=False;User ID=service1;Data Source=SD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;Pooling=true;PASSWORD=ases;";
    string strConnection2 = "Persist Security Info=False;User ID=service1;Data Source=SD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;Pooling=true;PASSWORD=ASES;";
    string strConnection3 = "Persist Security Info=False;User ID=service1_customer;Data Source=SD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;Pooling=true;PASSWORD=ases;";
    OracleConnection con = new OracleConnection(strConnection1);
    con.Open();
    OracleConnection con1 = new OracleConnection(strConnection2);
    con1.Open();
    OracleConnection con2 = new OracleConnection(strConnection3);
    con2.Open();
    When i run the below Query
    select * from V$session where PROGRAM='WindowsApplication7.vshost.exe'
    I am getting 6 session. Please help me out in this regard.

    The Error message was “Unable to open connection” once it reach the maximum session.
    I agree for that, Previously I was not disposing that connection object. Presently I am using keyword to dispose the connection object.
    Here I have doubt
    In connection string the pooling attribute is true by default.
    Scenario 1:
    If I specify externally(through connection string it behaves very badly) like pooling=true in the connection string. It will create more than one session.
    Scenario 2 :
    If I donot specify pooling attribute in connection string it will create only one session and it will consume the same session for all the instance.
    Below is the code snippet
    Here is the example for scenario 2
    private void button3_Click(object sender, EventArgs e)
    //Connection string which donot have a pooling value.
    string strConnection1 = "Persist Security Info=False;User ID= is_customer;Data Source=ISD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;PASSWORD=is;";
    using(OracleConnection con = new OracleConnection(strConnection1))
    con.Open();
    MessageBox.Show(GetSID(con));
    //con.Dispose();
    using (OracleConnection con2 = new OracleConnection(strConnection1))
    con2.Open();
    MessageBox.Show(GetSID(con2));
    //con2.Dispose();
    Scenario 1 Example:
    private void button7_Click(object sender, EventArgs e)
    string strConnection1 = "Persist Security Info=False;User ID= is_customer;Data Source=ISD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;Pooling=true;PASSWORD=is;";
    using (OracleConnection con = new OracleConnection(strConnection1))
    con.Open();
    MessageBox.Show(GetSID(con));
    //con.Dispose();
    using (OracleConnection con2 = new OracleConnection(strConnection1))
    con2.Open();
    MessageBox.Show(GetSID(con2));
    //con2.Dispose();
    GetSID is the function which is used to fetch the session of the connection string.
    private string GetSID(OracleConnection con)
         OracleCommand cmd = new OracleCommand();
         cmd.Connection = con;
         cmd.CommandText = "select SYS_CONTEXT('USERENV','SID') from dual";
    object sid = cmd.ExecuteScalar();
    return Convert.ToString(sid);
    In Scenario 2 example I will get only one session ID.
    But in Scenarion 1 example I will get different session ID’s.
    Please suggest what is the problem.
    Message was edited by:
    user476285

  • Problem deploying more than one session beans(one is ok)

    hi there,
    im trying to deploy an ear that contains ejbs(entities and session). application goes ok if deploy it with any number of entities being called by a single session, i mean if there is only session bean in the ejb-jar.xml. it is deployed ok and works fine.
    now when i try to add another session bean to the same ejb-jar.xml, it gives the following error during deployment.
    The system is out of resources.
    Consult the following stack trace for details.
    java.lang.OutOfMemoryError
    that's all what it prints and aborts deployment. again, its important that it deploys any number of entity beans problem is with more than one sessions.
    thanx for any suggestions,
    amt

    Without seeing more details I don't understand why you would be running out of memory. We test applications with multiple session beans and we don't have that issue so I'm not sure why you would. Out of memory could be a bug in the deployment descriptor or the ear file or the JVM or the container or the deployment mechanism or maybe something else. That is the tough part of memory issue debugging at deployment time.
    I would try to see if increasing memory on both the JVM for OC4J and for admin.jar (assuming you are using standalone OC4J when you deploy) to see if maybe it is something transient that is causing this to occur. Something else you could try is to use 1.3.1 JDK and see if the problem goes away. Beyond that I would try to get the simplest case you could that repeats the error and then let's take a look at it.
    As for the exception hierarchy you describe, I don't see any particular problem with it at first look. Are you getting an error?
    Thanks -- Jeff

  • More than one session in IC WebClient

    Hi there,
    I have the following question: Is it a problem for the IC WebClient user to open more than one session within the Internet Explorer?
    From SAP docu side I cannont see any side-effect in doing so.
    Do you think this can lead to any performance issues?
    Thanks a lot in advance
    Cheers
    Ingo

    Hi Ingo,
    Generally ICWebClient is designed for the use in Customer Interaction or Customer Support Centres where usually agents can login and resolve customers query which means seperate user for seperate agents.hence it is advisable to use only one user per login but it would not effect the functioning of the application if more than one logins are also used since it is just a UI the background is processed in separate server.
    thanks,
    ashish.

  • Restricting the user to only one session. Is this possible ?

    We have a web enabled Forms6i application running on Unix AIX server. user logs on to this application through a application logon screen.
    We have a requirement where we have to restrict user from logging on more than once to the application.
    - We thought of implementing this functionality through a database field which get set and resets each time a user logs on and logs off the application. Issue here is when do u reset the field. ? Is there a trigger on form which fires no matter how user exits from the system , including PC crahs ?
    - is there a better way of handling this functionality.
    Any help will be appreciated.
    Thanks,
    Gana

    Try to use Oracle profiles
    create profile test limit
    sessions_per_user 1;
    then assign this profile to the users you want them to have one session only. Moreoever, you have to change the parameter LIMIT_RESOURCES=TRUE in the init.ora parameter file.
    After changing the parameter file, shutdwon the database and open it again to let the profiles take effect on the user session.
    Good luck

  • When I login to EBS as Japan language session some Forms Application is Eng

    Hi ,
    have recently applied japan NLS on r121.1 and later upgraded to 12.1.3 also applied 9239090(japan as well).
    But customer has complained the error below.
    Any ideas on it .
    Forms Application is still English.
    When I login to EBS as Japan language session, some Forms Application is English.
    e.g
    user MFG
    pass welcome
    Resp Manufacturing and Distribution Manager
    Path Inventory>品目>品目関連
    Thanks

    ls: /u100/app/HONDA1/orhonda1/oracle/aphonda1/apps/apps_st/appl/po/12.0.0/forms/JA/POXRQVRQ.fmx: No such file or directoryThis indicates that the fmx file was not generated via adadmin -- Can you upload the adadmin log file here?
    and also, after logging into the application selecting japan,to the left side i can see some responsibilities in english still..Is this the normal behaviour.No.
    Have you generated all NLS menus via adadmin? If possible, upload the log file.
    In the preferences tab when i check,logging to application with english can see the below..
    Current Session Language :- American English
    Default Session Language :- American English
    Is the above correct ?
    Do we need to perform any steps to so that we can see the responsibilites in english.Change the session language to Japanese and check then.
    Thanks,
    Hussein

  • How can I copy a track from one session to another?

    I want to copy an entire track (strip setting and audio/midi) from one session to another. The only option I can seem to find is to bounce or export as audio.
    Is there any way to do this besides copy/paste the strip setting, copy/paste the software instrument, copy/paste the midi?

    Why don't you save the channel strip (including the Software instrument) as a preset and insert it in the new session? Doesn't affect Volume and panning though unless it is automated. Then you could copy+paste the Automation. Audio and Midi files have to be copied+pasted.

  • One login for multiple applications

    Hi,
    I was using HTMLDB 1.6 and followed the following guidlines: one login multiple applications for one login to multiple applications. Basically I set the cookie name the same for both applications. It worked.
    Now I've upgraded to HTMLDB 2.0 and this doesn't work anymore. I need to login to each application. Any way around this?
    Thanks,
    Marty

    Scott
    I have an SQL report region that includes this column:
    decode((select count(*) from gr_agency_add f, gr_emp_add a where a.empid = g.userid and a.aid = f.aid and a.add_type = g.address_option), 0, '', '<a href="f?p=&APP_ID.:9:' || :APP_SESSION || '::::P9_GRID:' || g.GRID || ' target="_blank">') ||decode(trunc(length(g.topic)/30), 0 , g.topic || '</a>', substr(g.TOPIC,1,30)||'..') "Topic",
    With the
    target="_blank"
    of course I am opening page 9 in a new window. I never had a problem with this but today, in a demo to some executives, the new window apparently came up with the login page and not page 9. Would this be due to a browser setting? Unfortunately, I don't have much info about the laptop they were using.
    The demo was still a success!
    Bill

  • How to share the same session between JNLP Application and browser session

    How to share the same session between JNLP Application and browser session using BasicService.showDocument(url) method? It appears whenever i launch any URL from within a JNLP application using BasicService.showDocument(url) , it creates new instance of browser and session even after i used cooke handlers to restore JSESSIONID and Ltpa token etc.
    public static int showDocument(String urlToOpen)
    BasicService obj = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
    obj.showDocument(urlToOpen);
    }

    Try using Reflection

  • User to one session at a time in ACS 5.1

    Dear friends, I have installed the ACS 5.1 and linked to my WLC, and when I enter my Logeo I agree Signature: User and password whenever you want from different devices, I want to do is only allow a user to one session at a time , someone can guide me?
    I am using radius server
    thanks

    Hans, Steve:
    Good day.
    I can find the "Max-Login Ignore Identity Response" under Security -> Local EAP -> General.
    But I could not find the part that Steve talked about (concurrent login)!! Did you Steve meant ssh/telnet sessions?

  • Not able to clear session of web application running inside wpf browser control

    Hi,
    I have used below code to clear session of web application running inside wpf browser control .   
    [DllImport("wininet.dll", SetLastError = true)]
       private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength);
     InternetSetOption(IntPtr.Zero, INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);
    This code is working in Windows 8 but it is not working in windows 7 and windows 8.1.
    I want to know why it is not working and how to make it work in windows 7 and windows 8.1
    Please help.
    Thanks & Regards,
    Pritesh

    Hi,
    I have used below code to clear session of web application running inside wpf browser control .   
    [DllImport("wininet.dll", SetLastError = true)]
       private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength);
    InternetSetOption(IntPtr.Zero, INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);
    This code is working in Windows 8 but it is not working in windows 7 and windows 8.1.
    I want to know why it is not working and how to make it work in windows 7 and windows 8.1
    Please help.
    Thanks & Regards,
    Pritesh

  • In one sessions.xml file can i include more than one project

    Hi Folks,
    I got a requirement to create more projects by using the same sessions.xml file if it is possible please let me know.
    thanks
    Venkatram R. Veerareddy

    Hi Venkatram,
    It is possible to have more than one session in sessions.xml. Have the sessions.xml like this
    <toplink-configuration>
    <session>
    <name>Session1</name>
    </session>
    <session>
    <name>Session2</name>
    </session>
    </toplink-configuration>
    Use session broker for handling both the sessions simultaneously. For more details see examples in toplink under directory broker.

  • In private browsing not working in Firefox 3.6.12 If I open yahoomail one session for one account and if I open other session for yahoomail, it automatically opens the earlier mail account.

    In private browsing not working in Firefox 3.6.12 If I open yahoomail one session for one account and if I open other session for yahoomail, it automatically opens the earlier mail account. But if I want to use more than one yahoomail accounts, in private browsing is not working. Please suggest.

    That problem isn't related to Private Browsing specifically, that's how Firefox works with regards to multiple "sessions" with the same server - only one logon is allowed at any time. Try using one of these extensions to be able to run multiple session cookies.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

Maybe you are looking for