Accessing user connected to my JSP application

Does somebody know how can i access the informations of all my
connected users at a given time in my JSP application with OC4J.
I want to pick a user randomly in that pool and make him win a
prize so that my users will want to come back frequently.
I tought of a autonomous Java thread that can access those info
of my users and pick someone ranomly at a given interval.
Thanks

You need to make sure that your users are logged in using one of
the OC4J usermanagers. I am assuming you have already worked
that one out.
You will need a bean that collects all of the usernames, and
then a method in the bean the randomly selects one. So the rub
is, how do you get at the usernames?
Depending on the usermanager, you would get the users with the
method
List users = usermanager.getUsers(0,usermanager.getUserCount());
See the api on usermanager's
http://www.orionserver.com/docs/api/index.html
regards,
the elephantwalker
www.elephantwalker.com

Similar Messages

  • Cannot view history of direct access users connecting to Forefront UAG

    Hi, I'm trying to get a list of the users that have been connecting through UAG Direct Access for the past month. I've tried using the methods shown in the technet articles about monitoring of UAG Direct Access either using Powershell or the TMG event loggin
    console, using this links:
    http://technet.microsoft.com/en-us/library/gg313776.aspx
    http://technet.microsoft.com/en-us/library/gg313783.aspx
    Using the TMG event logging I see a lot of data from a few days back, even if the filter is set to 30 days, and the log is supposed to be up to 8GB in size before overwriting. The info that it shows is only about sessions to the portal trunk and not direct
    access. I know this because on the UAGModuleID column there is no there are no "connected" or "managed" sessions, all are SessionMgr, UserMgr, Filter and RDG mainly.
    Through powershell I tried running the following commands after importing the module according to the article:
    Get-Directaccessusers -showhistory $true and no results are shown.
    Get-Directaccessusers -showhistory $true -starttime "1/6/2015 8:00AM" and no results shown
    Get-Directaccessusers -showhistory $true -starttime "1/6/2015" no results
    Get-Directaccessusers -showhistory $true -starttime "1/2/2015 8:00AM" -Endtime "1/11/2015 8:00PM" no results
    Get-Directaccessusers -showhistory $true -username user = no results.
    Get-Directaccessusers -username user = no results
    the only command that shows any data is just Get-Directaccessusers but that shows the current Direct Access users, no history.
    I checked the Registry HKEY_LOCAL_MACHINE\SOFTWARE\WhaleCom\e-Gap\von\MonitorMgr\sql-builtin-log registry key and it is on 1.
    Any ideas on how can I get more history data on the direct access users connecting through UAG?
    Please let me know.
    Appreciated it.
    Thank you!
    Eduardo Rojas

    Russel,
    the problem has been solved now! The final thing missing was just a check in a  checkbox.
    Below a comprehensive explanation that may help others.
    We basically did what you proposed:
    We sent a ping from one of the DA-Clients to the TS-Farm members. Since we got replies, we knew that IPv6 communication generally is okay. The answer received was an IPv6. In this scenario we had not yet given any IPv6 to the farm-members! Thus we knew it must
    be comming from the DA DNS-Proxy. There are a number of DA-GPOs and one of them is dictating the net portion of the IPv6 to be used in DA-communication, appended by a hex-translation of the target computers IPv4. Therefore the DA DNS-Proxy is taking the GPO-set
    IPv6-value, adds the IPv4 in hex and sends it  back as an ICMP echo.
    With this in place and working correctly one can ping any domain host from any DA-Client. This is configured when initially setting up DA and is handled by the wizzard. Once DA is installed this should all be in place without extra user interaction.
    We then took those IPv6 answeres and turned them into fixed IPv6es of the farm-members (each member its own IPv6). So far so good, but this is where it still did not work. Evaluation of the Connection Broker log showed that the redirect reply still included
    only the IPv4 of the target farm-member. With that (after a short while) we realized that one has to set a
    check in the Connection Brokers Settings, so that the IPv6 LAN-Connection will be used for redirects as well and not only the IPv4 LAN-connection..... How stupid is that? :-)
    But as we all know - in dealing with server configuration - you should always "know before you go". But even though you may think you do, when finally arriving you know you didn't.... And that's what we call experinece.
    Thanks to Russel for your interest and help.
    Brgds Ralf

  • Access users in a Web Dynpro application on different WAS ??????

    Hi,
    Scenario - I have a local WAS on which i have deployed a Web Dynpro Based application.
    There is another WAS on which I have portal installed. I need to access the roles assigned to a particular user in my Web Dynpro application.
    Query -
    I need to know can i access the roles assigned to a user on a different WAS in a Web Dynpro based application running on a different WAS.
    Thanks and Regards,
    Amol Ghodekar.

    Amol,
    as this questions existed twice, I've deleted one.
    As roles are in the UME, you can access them. But why do you want to do this? You could login to that user, but then the question is what you want to do....
    Regards,
    Benny

  • Accessing user libraries from deployed JSP. Problem

    I've created a workspace and project contining 1 web bean "AQABeanPK1.AQATableView" .
    I then used the 'manage libaries' to add it to Jdeveloper as a library.
    I also added the webbean to Jdeveloper via the manage web objects tool
    In my jsp project I included the library in the project settings
    created a JSP and used the web bean from the component palette.
    When I deploy the JSP I get the error :-
    Errors compiling:C:\jdev903\j2ee\home\application-deployments\webapp1\webapp1\persistence\_pages\\_CustomersView1__Browse.java
    Line # Error
    118
    [jsp src:line #:22]
    Class AQABeanPK1.AQATableView not found. AQABeanPK1.AQATableView CA = null;
    129
    [jsp src:line #:22]
    Class AQABeanPK1.AQATableView not found. CA = (AQABeanPK1.AQATableView) pageContext.findAttribute("CA");
    134
    [jsp src:line #:22]
    Class AQABeanPK1.AQATableView not found. CA = (AQABeanPK1.AQATableView) pageContext.findAttribute("CA");
    139
    [jsp src:line #:24]
    Variable CA may not have been initialized. CA.render();
    If I create the webbean in the same project as the JSP then I get a successful run.
    Any help on deploying user libraires would be appreciated
    Cheers
    Colin

    Place your web bean .jar file in the OC4J j2ee\home\lib directory.

  • Way to switch the connection in a JSp application

    Is there a way to switch connections in my Online Orders application. I switched the database and connected to a new one. It's also listed under connection manager and highlighted. But, for some reason, the application tries the original connection that I created the application with. Isn't there a way to modify to a new connection for this application?
    A

    I beleive this JDBC connection gets hardcoded in the project. I tried to create a connection with the same name, but, ofcourse database, username and PW different. It still returns application error. Does anybody have an idea on to where the JDBC info gets written in the project?
    A

  • Accessing User Name in a JAVA application from a PKI certificate

    Our JAVA application needs to verify the username from a PKI certificate. Is there any way to access this information. We are developing using Oracle JDeveloper, Oracle App Server and db.
    Thanks,

    I don't know if it is possible to run the main method from another Java app by simply calling it...
    But you could just copy and paste the stuff from your main method into a new static method called something like runDBQuery and have all the execution run from there.
    How does that sound? Is it possible?
    What I'm suggeting is:
    Original
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void main(String[] args){
    // Your method calls
    //Your initializing
    doQuery();
    }Revised:
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void doMyQuery(){
    // Your method calls
    //Your initializing
    doQuery();
    // No main needed!!
    //public static void main(String[] args){
    // Your method calls
    //doQuery();
    //}

  • Measure the number of user connected to an Application

    Hi,
    How can I find the number of users connected to a weblogic application
    Can you help me understand how can I measure this parameter for a monitoring purpose?
    Thanks in advance,
    Nicola Attico

    Current Sessions is the current total number of open sessions for each application. Yes, you can use JMX or WLST within a script.
    The WebAppComponentRuntimeMBean mbean of your application provides this information through OpenSessionsCurrentCount attribute.
    For instance, in WLST enter:
    wls:/my_domain/serverRuntime/ApplicationRuntimes/my_application/ComponentRuntimes/my_app> cmo.getOpenSessionsCurrentCount()
    For JMX I suggest to you see [http://download.oracle.com/docs/cd/E13222_01/wls/docs91/wlsmbeanref/core/index.html]
    Edited by: Betino on 22/10/2009 11:26 AM

  • Connecting to a database from Business Components JSP Application

    Hallo All!
    Can anybody give me an advice about connecting to a database from Business Components JSP Application? In all examples I see that Oracle user name and password placed in configuration file.
    How can user provide his own name and password to start Oracle session and how then hi can close this session?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dmitri:
    Dear Laura,
    I mean first variant where the database would be the same:
    scott/tiger@database1
    foo/bar@database1
    Of course I understand that we must register every user in database by "CREATE USER XXX" and it is unacceptable for Internet. But it may be very convenient for an Intranet because we can build access restriction based on set of views without any changes in applications.
    Best wishes,
    Dmitri.<HR></BLOCKQUOTE>
    null

  • How do I check the current number of users connected to the application?

    Hi there,
    I would appreciate that you advise me on how to know how many users are accesing
    an application I've got in production, powered by BEA WebLogic Server 6.1.
    In the Administration console, I go to the specific server, and inside the tab "monitoring",
    then "Performance", I've got some graphics showing the memory usage and throughput.
    But, where do I see the number of actual connection to the application?
    Thanks

    Mark Griffith <[email protected]> wrote:
    Oscar:
    I am pretty sure that WLS doesnt give you the type of monitoring you require. You
    might have to check out one of the third party monitoring partners like Wiley or
    Precise.I guess that depends on how you define 'how many users are accessing' an
    application(s) - for example, 'OpenSessionsCurrentCount' can serve as a rough measure of
    the number of users currently using the web application. or, number of threads + execute
    queue length can give you an idea of current number of user requests executing/waiting
    to be executed at any given time, etc. WebLogic does provide lots of useful monitoring
    information, and the fact that it uses JMX makes obtaining this information very easy.
    Having said that I would like to ask a couple of questions.
    a) what is your app (EAR? EJB's WebApp?)
    b) why do you want to know, meaning as soon as you know how many what is the next
    thing you want to know/see?
    Cheers
    mbg
    "Oscar" <[email protected]> wrote:
    Hi there,
    I would appreciate that you advise me on how to know how many users are
    accesing
    an application I've got in production, powered by BEA WebLogic Server 6.1.
    In the Administration console, I go to the specific server, and inside the
    tab "monitoring",
    then "Performance", I've got some graphics showing the memory usage and
    throughput.
    But, where do I see the number of actual connection to the application?
    Thanks
    Dimitri

  • Get count of users connected to my application via browser but not through console

    Hello,
    My requirement is to find the no. of active, connected and disconnected users and
    inactive time of each user to
    my application on weblogic server 5.1.0 sp-10. when i used console it gives only
    count of users connected via
    console. I need it without starting console. I tried
    http://localhost:7001/AdminMain?refreshSecs=60 but this also works same as console.
    I also tried using weblogic api in jsp like below but output is 0;
    <%@ page import="weblogic.rjvm.*" %>
    <%
    weblogic.rjvm.RJVMManager rr = weblogic.rjvm.RJVMManager.getRJVMManager();
    int Cc = rr.getConnected() ;
    int Dc = rr.getDisconnected();
    String Name = rr.getName();
    int active = rr.getActive();
    %>
    <html>
         <head>
    </head>
         <body>
    Active Users =<%=active%>
    <br>
    Disconnected Users =<%=Dc%>
    <br>
         </body>
    </html>
    Please, reply me asap...
    Thank you,
    Sandeep

    Hi Sandeep,
    You might try posting your request to the weblogic.developer.interest.jsp newsgroup.
    HTH,
    Bruce
    Sandeep wrote:
    Hello,
    My requirement is to find the no. of active, connected and disconnected users and
    inactive time of each user to
    my application on weblogic server 5.1.0 sp-10. when i used console it gives only
    count of users connected via
    console. I need it without starting console. I tried
    http://localhost:7001/AdminMain?refreshSecs=60 but this also works same as console.
    I also tried using weblogic api in jsp like below but output is 0;
    <%@ page import="weblogic.rjvm.*" %>
    <%
    weblogic.rjvm.RJVMManager rr = weblogic.rjvm.RJVMManager.getRJVMManager();
    int Cc = rr.getConnected() ;
    int Dc = rr.getDisconnected();
    String Name = rr.getName();
    int active = rr.getActive();
    %>
    <html>
    <head>
    </head>
    <body>
    Active Users =<%=active%>
    <br>
    Disconnected Users =<%=Dc%>
    <br>
    </body>
    </html>
    Please, reply me asap...
    Thank you,
    Sandeep

  • Get count of users connected to my application via browser but not throuhg console

    Hello,
    My requirement is to find the no. of active, connected and disconnected users and
    inactive time of each user to my application on weblogic server 5.1.0 sp-10. when
    i used console it gives only count of users connected via console. I need it without
    starting console. I tried
    http://localhost:7001/AdminMain?refreshSecs=60 but this also works same as console.
    Please, reply me asap...
    Thank you,
    Sandeep

    Hello again,
    I also tried using weblogic api in jsp file as below but result is 0.
    <%@ page import="weblogic.rjvm.*" %>
    <%
    weblogic.rjvm.RJVMManager rr = weblogic.rjvm.RJVMManager.getRJVMManager();
    int Cc = rr.getConnected() ;
    int Dc = rr.getDisconnected();
    String Name = rr.getName();
    int active = rr.getActive();
    %>
    <html>
         <head>
    </head>
         <body>
    Active Users =<%=active%>
    <br>
    Disconnected Users =<%=Dc%>
    <br>
         </body>
    </html>
    "Sandeep" <[email protected]> wrote:
    >
    Hello,
    My requirement is to find the no. of active, connected and disconnected
    users and
    inactive time of each user to my application on weblogic server 5.1.0 sp-10.
    when
    i used console it gives only count of users connected via console. I need
    it without
    starting console. I tried
    http://localhost:7001/AdminMain?refreshSecs=60 but this also works same
    as console.
    Please, reply me asap...
    Thank you,
    Sandeep

  • How to access a Portal User Info from a J2EE application?

    Hi,
    I have deployed a j2ee application in portal and its running fine.
    from that application i need to assign some roles to some users.i have the user id.
    so my doubt is can i access the portal user info from this j2ee application?i have some servlets in the j2ee application....can i get the portal user info from this servlet?
    plz help me
    regards,
    Visweswar

    Hi,
    Please check out this to get the portal user information from Java -
    WdClientUser class/Interface to aciehve this.
    Please check out these links on the same -
    WDClientUser.getClientUser IUser
    help needed
    Regards
    Lekha

  • How to provide access to multiple users connected to a Dumb switch? (multi-auth/multi-domain)

    Good morning everybody,
    I am writing on behalf of not being able to implement a desired outcome in our company network. In fact the situation is as follows:
    What I want to do is to be able to authenticate users (802.1x authentication) in our company radius server and authorize them access by having a dynamic VLAN assignment in a multi-user environment on one and the same port of a Cisco 2960 switch. So far, the authentication and authorization has been working completely smoothly (there are no problems with itself). The concept involves the configuration of both DATA and VOICE VLANs as I there is also phone authentication implemented. In order to simulate this environment I introduce a Dumb switch connected to my Cisco 2960 Catalyst.
    What I have successfully managed to get to work so far is this:
    1) On one switch port I have tried the “authentication host-mode multi-domain” and it worked perfectly for a PC behind a telephone, or with one PC connected to a the dumb switch + the telephone connected to another port of the dumb switch. Logically it is the same situation as there is a separation in two domains – DATA and VOICE. Bellow is an output from show authentication sessions for this scenario.
    Interface  MAC Address     Method   Domain   Status         Session ID          
    Fa0/23     0021.9b62.b79b  dot1x    DATA     Authz Success  C0A8FF69000000F3008E (user1)
    Fa0/23     0015.655c.b912  dot1x    VOICE    Authz Success  C0A8FF69000000F9009F (phone)
    2) On the other hand, when I try the same scenario with the “authentication host-mode multi-auth”, the switch still separates the traffic in two domains and is able to authenticate all users, AS LONG AS they are in the same VLAN.
    show authentication sessions:
    Interface  MAC Address     Method   Domain   Status         Session ID          
    Fa0/23     0021.9b62.b79b  dot1x    DATA     Authz Success  C0A8FF69000000F3008E (user1)
    Fa0/23     b888.e3eb.ebac   dot1x    DATA     Authz Success  C0A8FF69000000F8008C (user2)
    Fa0/23     0015.655c.b912  dot1x    VOICE    Authz Success  C0A8FF69000000F9009F (phone)
    However, I cannot succeed authentication of many users from DIFFERENT VLANs, neither in multi-auth nor in multi-domain modes.
    What I want to get is an output like this:
    Interface  MAC Address     Method   Domain   Status         Session ID          
    Fa0/23     0021.9b62.b79b  dot1x    DATA     Authz Success  C0A8FF69000000F3008E (user1)
    Fa0/23     b888.e3eb.ebac dot1x    DATA     Authz Success  C0A8FF69000000F8008C (user2)
    Fa0/23     0015.655c.b912  dot1x    VOICE    Authz Success  C0A8FF69000000F9009F (phone)
    I want the switch to authenticate the users anytime they connect to itself and for them to have an instant access to the network. (I tell this because I tried scenario 1) with multi-domain mode and authentication violation replace, and it worked but, two users never had access to the “Internet” simultaneously!!!
    The configuration of the interface connected to the Dumb switch is as follows.
    interface FastEthernet0/x                                                      
     description Connection to DUMBswitch                                            
     switchport mode access                                                         
     switchport voice vlan XXX                                                      
     switchport port-security maximum 10                                            
     switchport port-security                                                       
     switchport port-security violation protect                                     
     authentication host-mode multi-auth                                            
     authentication priority dot1x                                                  
     authentication port-control auto                                               
     authentication timer reauthenticate 4000                                       
     authentication violation replace                                               
     dot1x pae authenticator                                                        
     dot1x timeout tx-period 10                                                     
     spanning-tree portfast                                                         
    The way I see it is explained in the following steps:
    - PC1 connects to the Dumb switch. This causes the Cisco switch to authenticate user1. This creates an auth. session with its MAC address linked to a domain DATA.
    - When PC2 connects to the Dumb switch, this causes the violation replace which replaces the recent authenticated MAC address with the MAC of PC2. I would like it once authenticated to appear in the authentication sessions with a link to a new DATA domain linked to the VLAN assigned from the RADIUS server.
    Is this possible? I think (in theory) this is the only way to provide authenticated access to multiple users connecting through Dumb switch to the network.
    Has anybody ever succeeded in such a configuration example and if yes, I would be love to get some help in doing so?
    Thank you
    Stoimen Hristov

    Hi Stoimen,
    I have done a setup similar to yours with the only exception being VLAN assignment. When I used dACLs only, it makes things somewhat easier as the VLAN no longer matters. Remember that the switchport is in access mode and will only allow a single VLAN across it (with the exception of the voice VLAN). I think that is the real cause of your problem.
    From what I can see, you have 2 options available to you:
    1) Use dACLs instead of VLAN assignment. This means that an access list will be downloaded from the radius server straight to the authenticated user's session. I have tested this and it works perfectly. Just Google Cisco IBNS quick reference guide and look for the section that deals with Low Impact mode.
    2) Get rid of the dumb switches and use managed switches throughout your network. Dumb switches will always be a point of weakness in your network because they have no intelligence to do advanced security features like port security, 802.1x, DHCP snooping, etc.
    Hopefully someone else will chime in with another option.
    Xavier

  • Using MS-Access database in JSP application

    Hi, all. I am new in JSP world. I have an Access database and I�d like to access it in my JSP Application.
    Does anybody know I could do this?
    TIA
    Fernando

    Define your database as an ODBC source and then use the JDBC/ODBC bridge. It's actually only a few lines of code - see http://java.sun.com/docs/books/tutorial/jdbc/basics/index.html

  • Possible to connect remotely to Apache TomCat JSP application server

    Hi, I've just installed an Apache TomCat server and locally playing around with some JSP and Servlets.
    I have an website which is hosted remotely by an hosting company.However they do not provide JSP/Servlets server as an service.
    I want to know is it possible to add some code or something which connects to my JSP/Servlet TomCat server remotely. So, allowing me to add JSP code or Servlets to say my index.html at my website host location which then connects from their to my TomCat server JVM and spit the goods back out at my website location.
    Is this possible? seems quite awkard?

    You are certainly not in an ideal situation. While you could use AJAX, and a library like DWR to send requests between the hosted website and whatever JSP/Servlet engine you have available, the resulting application will likely be slower and less reliable than if you hosted it all in the same place. Realistically, you won't save yourself any effort by doing it this way. Application hosting is a lot more resource-intensive than hosting static content, and even more so due to the amount of abuse that goes on in the wild Internet.
    While you've solved the problem temporarily, your JSP/Servlet engine is still vulnerable to DoS-based attacks once it's determined where your AJAX servlets reside. The only long-term solution is to go with a provider that has proper JSP hosting that is known to have good security.
    Brian

Maybe you are looking for

  • Fax via Network Multi-Function Printer

    I own a HP Multi-Function device to print, scan, fax, etc. My home network is set up to PRINT wirelessly from my computer to my printer, but for some reason I am unable to FAX wirelessly. As of now I must first print the document then fax it manually

  • Can I print multiple copies of the same picture on iphoto 9.5

    I used to be able to print multiple copies of the same picture on one page using iphoto. There was a customise button when you went through to print and it was there somewhere. I can't see it anymore - maybe since an upgrade. Can anyone see how to do

  • The default button in JFileChooser

    Is it possible to make either the 'save' or 'cancel' button the default button (the one that will be pressed when the user presses the 'enter' key after the dialog is shown) in a save-dialog ? It will probably involve setting the focus to either one

  • Advanced Search

    Hi !! We are implementing SRM 7.0. To search for SRM documents we enter to the Strategic Purchaser POWL in EP and access to Advanced Search. We can search and get the document list, but when clicking on a document like an RFX to access to it nothing

  • Possible to lock file and move it afterwards?

    Hi Java-Gurus, I am trying for quite a while now to lock a file (with FileChannel/FileLock) and to move it afterwards. At the moment it seems like the file is locket for my java application as well as for other applications. Is there a way to lock th