How can create a MBean for LoginServlet?

hi all,
i am new to JMX concepts.
i would like to find the response time for a login (servlet & jsp) process using JMX MBean.
anybody have material to do this plz give me.

hi ,
i solved
here i am posting that steps
JMX Interface definition
ResponseTimeCalculatorMBean interface defined as follows.
public interface ResponseTimeCalculatorMBean
Note: MBean interface name must be ended with MBean.
JMX MBean Implementation
ResponseTimeCalculatorMBean interface implemented in class.
Implementation class should be the same name as MBean interface name except the suffix 'MBean'.
public class ResponseTimeCalculator implements ResponseTimeCalculatorMBean
Attributes for ResponseTimeCalculatorMBean.
/*operations implementations*/
Registering with MBean Server
public class LoginResponseTimeService extends ResponseTimeCalculator implements MBeanRegistration
MBeanServer mbs;
ObjectName name;
public void start() throws Exception
//write custom code here to register custom Mbeans
mbs= ManagementFactory.getPlatformMBeanServer();
name= new ObjectName("mbean:type=ResponseTimeCalculatorMBean");
mbs.registerMBean(this, name);
/*MBeanRegistration interface implementations*
Now the JMX MBean service has been created.
JMX custom MBean with JBOSS Application Server
To monitor login process��s response time using JBoss Application server's jmx-console or JConsole utility, do the following steps.
Create an archive for created MBean classes (.class files)
eg.jar -cf ResponseTime.jar *.class
Set class path for ResponseTime.jar in "D:\jboss-4.2.0.GA\bin\run.bat" or copy and paste the ResponseTime.jar into D:\jboss-4.2.0.GA\server\default\lib
Configure MBean service name in JBoss-service.xml as follows
name="mbean: service=LoginResponseTime">
Run the server.
Now you can monitor the response time from http://localhost:8080/jmx-console.
i hope this will help to new guys
Edited by: Ram_Rengasamy on Sep 20, 2007 12:48 PM

Similar Messages

  • How can create air app for version 1.5 with cs5?

    How can be created an application for the latest Adobe AIR version ( 1.5 ) with Flash CS5. I have a licensed cs3 and I consider to buy cs5. I want to create an applications for the stable version of Adobe AIR.

    I posted about this last week. This should help:

  • How can create color table for "write bmp"?

    i want to create a color table for a 8 bit bitmap.The color table is the input of "write bmp". how can i make it?

    > i want to create a color table for a 8 bit bitmap.The color table is
    > the input of "write bmp". how can i make it?
    > thanks!
    There is a color control on the front panel numerics palette. A color
    in LV is a four byte xRGB formatted number. So you can make an array of
    the color numerics and set them by hand or format the numbers however
    you like. If unwired it will use the LV color palette which is pretty
    much the HTML palette.
    Greg McKaskle

  • Maintenance View - Can you sort/Filter? How to create z transaction for it?

    I will be creating a maintenance view that will be used several times at the end of every month, eventually storing more than 500 entries.
    Is there anyway for the user to be able to sort/filter the maintenance view by field? This would be helpful, since they would like to see what similar records are stored before adding others.
    What are my options?
    Also, how do you create a transaction code to go straight to the maintenance view instead of having to go through SM30?
    Please help.

    Hey John,
    Is there anyway for the user to be able to sort/filter the maintenance view by field? This would be helpful, since they would like to see what similar records are stored before adding others.
    What are my options?.
    We canu2019t give the sort button (as we give in the nomal reports). But if you know like - based on what field user want to see the sorted output(lets say field MATNR)? then we can create an Event for the table maintainance generator using SE11 and write the code. In this code we sort the output that will be displayed in SM30 as per the requirement.
    Also, how do you create a transaction code to go straight to the maintenance view instead of having to go through SM30?.
    Go-to SE93 and choose the option u201Ctransaction with parametersu201D and give the t.code as SM30 and Check Skip initial screen.

  • TS2755 How to I delete messages(Saved) so that I can create enough space for my update?

    How to I delete messages(Saved) so that I can create enough space for my update?

    If by "update" you mean you are trying to update iOS, then the way to do this is to use iTunes on your computer to perform the update.
    Plug your iPhone into (the current version of) iTunes on your computer.  Let it sync.  Then do "Check for Updates" from the iPhone's summary page in iTunes.

  • How can I repeat a for loop, once it's terms has been fulfilled???

    Well.. I've posted 2 different exceptions about this game today, but I managed to fix them all by myself, but now I'm facing another problem, which is NOT an error, but just a regular question.. HOW CAN I REPEAT A FOR LOOP ONCE IT HAS FULFILLED IT'S TERMS OF RUNNING?!
    I've been trying many different things, AND, the 'continue' statement too, and I honestly think that what it takes IS a continue statement, BUT I don't know how to use it so that it does what I want it too.. -.-'
    Anyway.. Enought chit-chat. I have a nice functional game running that maximum allows 3 apples in the air in the same time.. But now my question is: How can I make it create 3 more appels once the 3 first onces has either been catched or fallen out the screen..?
    Here's my COMPLETE sourcecode, so if you know just a little bit of Java you should be able to figure it out, and hopefully you'll be able to tell me what to do now, to make it repeat my for loop:
    import java.applet.*;
    import java.awt.*;
    public class Main extends Applet implements Runnable
         private Image buffering_image;
         private Graphics buffering_graphics;
         private int max_apples = 3;
         private int score = 0;
         private GameObject player;
         private GameObject[] apple = new GameObject[max_apples];
         private boolean move_left = false;
         private boolean move_right = false;
        public void init()
         public void run()
                        player.player_x -= player.movement_speed;
                   else if(move_right)
                        player.player_x += player.movement_speed;
                   for(int i = 0; i < max_apples; i++)
                       apple.apple_y += apple[i].falling_speed;
              catch(InterruptedException ie)
         private void prevent()
              if(player.player_x <= 0)
              player.player_x = 0;     
              else if(player.player_x >= 925)
              player.player_x = 925;     
         private void load_content()
         MediaTracker media = new MediaTracker(this);
         player = new GameObject(getImage(getCodeBase(), "Sprites/player.gif"));
         media.addImage(player.sprite, 0);
         for(int i = 0; i < max_apples; i++)
         apple[i] = new GameObject(getImage(getCodeBase(), "Sprites/apple.jpg"));
         catch(Exception e)
         public boolean collision()
              for(int i = 0; i < max_apples; i++)
              Rectangle apple_rect = new Rectangle(apple[i].apple_x, apple[i].apple_y,
              Rectangle player_rect = new Rectangle(player.player_x, player.player_y,
                   apple[i].alive = false;
                   apple[i].alive = false;     
         return true;
    public void update(Graphics g)
    if(buffering_image == null)
    buffering_image = createImage(getSize().width, getSize().height);
    buffering_graphics = buffering_image.getGraphics();
    buffering_graphics.fillRect(0, 0, getSize().width, getSize().height);
    g.drawImage(buffering_image, 0, 0, this);
    public boolean keyDown(Event e, int i)
         i = e.key;
    if(i == 1006)
    move_left = true;
    else if(i == 1007)
         move_right = true;
              return true;     
    public boolean keyUp(Event e, int i)
         i = e.key;
    if(i == 1006)
    move_left = false;
    else if(i == 1007)
         move_right = false;
    return true;
    public void paint(Graphics g)
    g.drawImage(player.sprite, player.player_x, player.player_y, this);
    for(int i = 0; i < max_apples; i++)
              g.drawImage(apple[i].sprite, apple[i].apple_x, apple[i].apple_y, this);
    g.drawString("Score: " + score, 425, 100);
    public void start()
    Thread thread = new Thread(this);
         public void stop()
         Thread thread = new Thread(this);
    thread.stop(); java.awt.*;
    import java.util.*;
    public class GameObject
    public Image sprite;
    public Random random = new Random();
    public int player_x;
    public int player_y;
    public int movement_speed = 15;
    public int falling_speed;
    public int apple_x;
    public int apple_y;
    public boolean alive;
    public GameObject(Image loaded_image)
         player_x = 425;
         player_y = 725;
         sprite = loaded_image;
         falling_speed = random.nextInt(10) + 1;
         apple_x = random.nextInt(920) + 1;
         apple_y = random.nextInt(100) + 1;
         alive = true;
    And now all I need is you to answer my question! =)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    package forums;
    import java.util.Random;
    import javax.swing.Timer;
    import javax.imageio.ImageIO;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class VimsiesRetardedAppleGamePanel extends JPanel implements KeyListener
      private static final long serialVersionUID = 1L;
      private static final int WIDTH = 800;
      private static final int HEIGHT = 600;
      private static final int MAX_APPLES = 3;
      private static final Random RANDOM = new Random();
      private int score = 0;
      private Player player;
      private Apple[] apples = new Apple[MAX_APPLES];
      private boolean moveLeft = false;
      private boolean moveRight = false;
      abstract class Sprite
        public final Image image;
        public int x;
        public int y;
        public boolean isAlive = true;
        public Sprite(String imageFilename, int x, int y) {
          try {
            this.image = File(imageFilename));
          } catch (IOException e) {
            throw new RuntimeException("Bailing out: Can't load images!");
          this.x = x;
          this.y = y;
          this.isAlive = true;
        public Rectangle getRectangle() {
          return new Rectangle(x, y, image.getWidth(null), image.getHeight(null));
      class Player extends Sprite
        public static final int SPEED = 15;
        public Player() {
          super("C:/Java/home/src/images/player.jpg", WIDTH/2, 0);
          y = HEIGHT-image.getHeight(null)-30;
      class Apple extends Sprite
        public int fallingSpeed;
        public Apple() {
          super("C:/Java/home/src/images/apple.jpg", 0, 0);
        public void reset() {
          this.x = RANDOM.nextInt(WIDTH-image.getWidth(null));
          this.y = RANDOM.nextInt(300);
          this.fallingSpeed = RANDOM.nextInt(8) + 3;
          this.isAlive = true;
      private final Timer timer = new Timer(200,
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
      public VimsiesRetardedAppleGamePanel() {
        this.player = new Player();
        for(int i=0; i<MAX_APPLES; i++) {
          apples[i] = new Apple();
        setFocusable(true); // required to generate key listener events.
      public void keyPressed(KeyEvent e)  {
        if (e.getKeyCode() == e.VK_LEFT) {
          moveLeft = true;
          moveRight = false;
        } else if (e.getKeyCode() == e.VK_RIGHT) {
          moveRight = true;
          moveLeft = false;
      public void keyReleased(KeyEvent e) {
        moveRight = false;
        moveLeft = false;
      public void keyTyped(KeyEvent e) {
        // do nothing
      public void paintComponent(Graphics g) {
        //System.err.println("DEBUG: moveLeft="+moveLeft+", moveRight="+moveRight);
        if ( moveLeft ) {
          player.x -= player.SPEED;
          if (player.x < 0) {
            player.x = 0;
        } else if ( moveRight ) {
          player.x += player.SPEED;
          if (player.x > getWidth()) {
            player.x = getWidth();
        //System.err.println("DEBUG: player.x="+player.x);
        Rectangle playerRect = player.getRectangle();
        for ( Apple apple : apples ) {
          apple.y += apple.fallingSpeed;
          Rectangle appleRect = apple.getRectangle();
          if ( appleRect.intersects(playerRect) ) {
            if ( apple.isAlive ) {
              apple.isAlive = false;
        g.drawImage(player.image, player.x, player.y, this);
        for( Apple apple : apples ) {
          if ( apple.isAlive ) {
            g.drawImage(apple.image, apple.x, apple.y, this);
        g.drawString("Score: " + score, WIDTH/2-30, 10);
      private static void createAndShowGUI() {
        JFrame frame = new JFrame("Vimsies Retarded Apple Game");
        frame.getContentPane().add(new VimsiesRetardedAppleGamePanel());
        frame.setSize(WIDTH, HEIGHT);
      public static void main(String[] args) {
          new Runnable() {
            public void run() {
    }Hey Vimsie, try resetting a dead apple and see what happens.

  • How to create a macro for a planning type in MC8b transaction

    I am presently working for a product allocation demand, which have a information structiure with characteristic and key field.
    the characteristic are production allocation quantity, incoming order quantity, and open order quantity.
    i have created a planning type in which the data updation takes from the excel file to the planning type in mc95.
    but i need to create a macro for this planning type .
    can any body give the details information how to create a Macro for a planning type.
    Thanks and regards

    Dear Gopal
    May be the link would be helpful to you.
    [Planning Types and Macros|]
    Drill down the left tab once you opened the link, for more information.
    G. Lakshmipathi

  • How to create custom infotype for training and event management

    hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
    PS No – PA0000-> PERNR
    Name   - PA0001 -> ENAME
    IS PS.No. – PA0001-> PS no. of Immediate Superior
    IS name PA0001 -> ENAME
    thanx in advance

    Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
    If you wish to create a PD infotype, use transaction PPCI to create the infotype.
    But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
    If you wish to create a PA infotype, use transaction PM01 to create the infotype.
    But before that you may be required to create a strcuture PSnnnn  (where nnnn is the infotype number) with all the fields relevant for the infotype.

  • How can I find ringtones for sale in iTunes? I don't see it as a category anywhere.

    how can I find ringtones for sale in iTunes? I don't see it as a category anywhere.

    Ferretbite wrote:
    You could also download the Ringtone Maker all for iPhone in the AppStore and create your own custom ringtones and message tones.
    Not needed.
    Easy enough to do in iTunes.
    Find the song you want and note the start/stop time you want the ring tone.
    Right click - get info, click the Options tab and set the start/stop times as above.
    Right click - Create AAC version. This creates a new file.
    Drag this new file from the iTunes window to the desktop.
    Delete the file from iTunes and also select Delete from hard drive.
    On the desktop, rename the file whateveryouwant.m4r (first part you can change to whatever you want & change the extension to .m4r).
    Drag the file back to the iTunes library at top left.
    Make sure iTunes prefs > General has Tones ticked.

  • How to create new scope for SharePoint calendar?

    How to create new scope for SharePoint calendar?
    I have a calendar list to which I want to create following scopes-
    Annual View
    Half Year 1 (Jan-June)
    Half Year 2 (Jul-Dec)
    Quarter 1 (Jan-Mar)
    Quarter 2 (Apr-Jun)
    Quarter 3 (Jul-Sep)
    Quarter 4 (Oct-Dec)
    How this can be created. Any help appriciated. Thanks.

    Hi Pratima,
    Can you please see below link and code snippet for how to
     format date in gridview.
    <html xmlns="">
    <head runat="server">
    <title>Gridvew Date format</title>
    <form id="form1" runat="server">
    <asp:GridView runat="server" ID="gvdetails" DataSourceID="dsdetails" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false">
    <RowStyle BackColor="#EFF3FB" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <AlternatingRowStyle BackColor="White" />
    <asp:BoundField DataField="Date1" HeaderText="Date1" HtmlEncode="false" DataFormatString="{0:s}" />
    <asp:BoundField DataField="Date2" HeaderText="Date2" HtmlEncode="false" DataFormatString="{0:D}" />
    <asp:BoundField DataField="Date3" HeaderText="Date3" HtmlEncode="false" DataFormatString="{0:m}" />
    <asp:BoundField DataField="Date4" HeaderText="Date4" HtmlEncode="false" DataFormatString="{0:d}" />
    <asp:BoundField DataField="Total" HeaderText="Total" HtmlEncode="false" DataFormatString="{0:C2}" />
    <asp:SqlDataSource ID="dsdetails" runat="server" SelectCommand="select * from DateFormat" ConnectionString="<%$ConnectionStrings:dbconnection %>"></asp:SqlDataSource>
    Hope this will help you.
    Soni K

  • How to create t-code for a table and how to create transaction variant???

    I have created a custom table zsark.
    Now my requirement is : I have to create a transaction variant zsark_var for sm30 and table zsark. I have to disable the output of the first screen. I have to assign the transaction variant to the transaction code of table zsark.
    1.     how to create transaction code to a table. Can any one give me the 
    2.     how to create transaction variant for the above requirement???
    Thanks & Regards,

    1 Goto SE93 transaction
    2 Choose 5th option Transaction with parameters
    3 Give transaction : SM30, Check Skip Initial Screen Press Enter
    4 Goto Bottom left corner, click F4 select viewname, on right hand side give table name
    5 Press one more time F4, choose update , mark it X on right side.
    6 save the transaction.
    reward if helpful

  • How to create transaction code for maintenance view

    hai friends,
    i hope every thing goes good.
    i have doubt, how to create transaction code for maintenance view. I created view for tranperant table and now i want to create transaction code for the view.
    i tried and i donot know the screen number and program name and where can i give the view name.
    if any one know please post in details.
    thanks in advance.

    Hi Elam,
    You need to create a "Parameter Transaction".
    What this means is that you will have a transaction (let's call it "ZMAINT") which calls "SM30" and passes in your table name.
    Go to transaction SE93 and enter your new transaction code. Enter in the Tcode description and choose "Transaction with Parameters" (it shouldbe the last radio button).
    Enter in the default transaction "SM30" and tick the "Skip Initial Screen" check box. Hit Enter.
    Now scroll to the bottom of the screen and you will see a Table Control where you will need to enter in the values to the SM30 selection screen.
    Because you hit ENTER, the program will have loaded in the Selection Screen parameters into it's memory. Hit the drop down for "Name of Screen Field" and select "VIEWNAME" and then enter in your Z Table in the "Value" column.
    Now go to the next line and hit the drop down and select "UPDATE" in the "Name of Screen Field". Enter in a "X" in the value column.
    Now save the transaction and there you have it.
    Hope this helps.
    PS. Kindly assign Reward Points to the posts you find helpful.

  • How to create a substitute for requester in SRM 7.0

    do you know how to create a substitute for requester?
    we have groups of 2 people and we want that they can see and edit shopping carts one of each other. Do you know how is it possible? it will be necessary for all SCs.

    You can use the "Team Cart" feature introduced in SRM 7 for your requirement.
    Take a look at this wiki page for more information
    Edited by: Jay Yang on Mar 31, 2011 10:47 AM

  • How to create internal table for a structure in BSP

    hi ,
    I have created a Structure in BSP.I want to create an internal table for that Structure. But in my coding ie.
    <% data: begin of itab_1 .
                     include type zuvendstr.
                     data:end of itab_1.
                     data wa_str like line of itab_1.
                     loop at itab_1 into wa_str. %>
                     <td><%=wa_str-name%> </td>
    In this zuvendstr is Structure ,wa_str is workarea and itab_1 is an Internal table.But it is showinng an error that itab_1 is unknown.But we cannot define internal tables for an Structure in Page Attributes.So,please resolve how to create internal table for Structure in BSPS

    You can define itab_1 like this (assuming zuvendstr is a structure type):
    DATA: itab_1 TYPE TABLE OF zuvendstr.

  • How to create business operation for starting workflows

    How to create business operation for starting workflows from worklist?
    When I call methods that implements business operation from java class everything
    works fine(wlpi-ejb.jar is required), but when I call business operation from
    Studio I can't use classes from wlpi-ejb.jar.

    Business operation is called by WLIS. So, I include wlpi-ejb.jar into WLIS classpath.
    Studio uses deployed EJB from wlpi-*.jar, I don't know why Studio doesn't see
    methods from deployed EJBs when WLIS classpath contains wlpi-ejb.jar.
    "Andrew Pitonyak" <[email protected]> wrote:
    When studio starts, what is your classpath? If you use the included batch
    file to start it, then your class path may not include this :-)
    "Raul" <[email protected]> wrote in message
    news:[email protected]..
    How to create business operation for starting workflows from worklist?
    When I call methods that implements business operation from java classeverything
    works fine(wlpi-ejb.jar is required), but when I call business operationfrom
    Studio I can't use classes from wlpi-ejb.jar.

Maybe you are looking for

  • My pictures no longer show up on mylisted items in ebay? why?

    I can see others pictures on ebay but when I list my own items for sale my pictures do not show--if I go to Int. Explorer they do show up and if someone else is looking at my items for sale--they can see the pictures? It happened all at once and have

  • Power Mac G4 got moisture in it. Now it won't power on. What could of been damaged?Help!

    I recently had my Power Mac G4 in my trunk and for some reason, there was moisture on the outside of the tower. Now it will not power on. There was no moisture on the motherboard but just around the power section. Could I have damaged anything else?

  • My midi doesn't work

    Hey everyone I've brought a midi so I can play my keyboard through GB. For some reason my mac won't pick up my keyboard. It use to work on my old mac but it doesn't seem to want to work now. Can anyone help me out on this one please? Thanks Bevan

  • IBooks not downloading

    When I am downloading books so that I can read them in iBooks they are showing up in my book library, but they are not downloading.  The bar at the bottom is there but they are not downloading.  I can also get the free samples of the books, but not t

  • Types in LSMW

    please explain the different types in LSMW. what is the advantage in using them.