Is rownum the best way to get a portion of a recordset?

ROWNUM is not working for me when I use ROWNUM > X
for exemple:
SELECT * FROM table
WHERE
rownum > 100 AND
rownum < 200
It is olny working on:
SELECT * FROM table
WHERE
rownum < 200
Am I doing something wrong?
Is rownum the best way to get a portion in the middle of the recordset?

Well you can try this.
SRI>select rownum, empno, ename, job
  2  from emp;
    ROWNUM      EMPNO ENAME      JOB
         1       7369 SMITH      CLERK
         2       7499 ALLEN      SALESMAN
         3       7521 WARD       SALESMAN
         4       7566 JONES      MANAGER
         5       7654 MARTIN     SALESMAN
         6       7698 BLAKE      MANAGER
         7       7782 CLARK      MANAGER
         8       7788 SCOTT      ANALYST
         9       7839 KING       PRESIDENT
        10       7844 TURNER     SALESMAN
        11       7876 ADAMS      CLERK
        12       7900 JAMES      CLERK
        13       7902 FORD       ANALYST
        14       7934 MILLER     CLERK
14 rows selected.
SRI>select rownum, empno, ename, job from emp where rownum <10
  2  minus
  3  select rownum, empno, ename, job from emp where rownum <5;
    ROWNUM      EMPNO ENAME      JOB
         5       7654 MARTIN     SALESMAN
         6       7698 BLAKE      MANAGER
         7       7782 CLARK      MANAGER
         8       7788 SCOTT      ANALYST
         9       7839 KING       PRESIDENT-Sri

Similar Messages

  • HT1349 I lost/had my iPhone stolen. Tried using Find My iPhone and it's offline. It was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Tried using Find My iPhone and it's offline. It (Find my iPhone) was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Find My iPhone is good for misplaced iPhone but not good for thief and it was never meant to be.
    You chance of getting it back is very small.
    There are a few things you can try.
    Try remote lock/wipe your iPhone through Find My iPhone.
    https://www.icloud.com
    You can report to the police, cell carrier (expensive cell charges for international calls, roaming etc)
    Change all the passwords used in iPhone: Apple ID, E-mail, Bank Account ....
    http://support.apple.com/kb/HT2526

  • What's the best way to get user testing of our app (we're based in the UK)

    Hi all.
    We've just developed our first app for Palm and would really like to get some feedback from Palm users (our app allows users to take photos and send them as real printed postcards. We'd be very happy to give users free postcards in exchange for feedback).
    The problem we have is that Palm users are pretty sparse in the UK. We've found that user testing with non-Palm users becomes handset testing rather than app testing. We have to teach them how to use Palm ("Where's the back button?") and so the testing mainly focuses on the particularities of Palm rather than our app. Plus, we don't benefit from the user being able to compare to other Palm apps.
    Any advice on the best way to get feedback from Palm users? Especially as they'll need to download the SDK and install our app using it in order to get it onto their phones.
    If any of the users of this forum are interested in giving the app a go and sending us feedback, I'd love to send you the IPK and then chat. Just send me an email using [email protected]
    Our app is available for Pixi+, Pre+ and Pre2.
     Thanks,
     Freddie.
    Post relates to: Pixi Plus p121ueu (SFR)

    Hello freddie:
    Welcome to the Palm Forums. Thank You for the offer. I highly suggest offering it up
    to our many enthusiasts on Twitter as a beta with the #webos hashtag or joining
    the Precentral.net community and list it in a topic there, homebrew beta. You would
    get better beta response if you Package your app and put it in an ipk to simplify
    the install.
    Hope that helps... Best of luck with your app!
    notimeoff

  • I recently added my old mac hard drive to a new macbook with an SSD as my main OSX drive.  I am having trouble with permissions in viewing my old hard drive.  What is the best way to get complete access to my old hd installed in my new Macbook?

    I recently added my old mac hard drive to a new macbook with an SSD as my main OSX drive. I am having trouble with permissions in viewing my old hard drive, when I save a permission when I reboot the full access is changed again .  What is the best way to get complete access to my old hd installed in my new Macbook?

    Open the Get Info window for the old drive. Click the Lock icon on the bottom of that window and type in your password. In the permissions area click the Plus sign ( + ) and Add your Username to it and set it to Read & Write. Close that window. you should now have full access to all the files.

  • What is the BEST way to get my macbook with lion on it, to communicate with my Canon 40D camera?

    What is the BEST way to get my macbook with lion on it, to communicate with my Canon 40D camera? It says the utility disk is a PowerPC app and that is no longer supported. What do I do now? I can't upload photos from my camera.

    Also, I had the same problem happen when I tried to install an older version of Corel Painter. Are Macbook Pro users just NOT supposed to be able to use their laptops for the purposes they are best designed for?
    -Frustrated new Mac user

  • Iphone 4s coming friday, what is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across.

    What is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across. If I do a restore as I have when previously from one iphone to another it has shown (in settings, usage) the cumulative usage from previous phones so all the hours of calls on all previous iphones will be displayed even though its brand new. Anyone know how I can get my notes (from standard iphone notes app) to my new iphone 4s without restoring from previous iphone 4. Thanks for any help offered.

    First, if you haven't updated to iTunes 10.5, please update now as you will need it for the iPhone 4S and iOS 5.
    Once you're done installing iTunes 10.5, open it. Connect your iPhone to iTunes using the USB cable. Once your iPhone pops up right click on it. For example: an iPhone will appear and it will say "Ryan's iPhone."
    Right click on it and select "Backup" from the dropdown menu. It will start backing up. This should backup your notes.
    Please tell me if you have any problems with backing up.
    Once you backup and get your iPhone 4S, you must follow these steps. If you don't follow these steps, you will not be able to get your notes on your new iPhone 4S.
    Open up iTunes again then right click on your device (iPhone 4S). Once you do you will see a dropdown menu. It will say "Restore from Backup..." Select this and it'll ask for a backup, select it from the dropdown menu. For example "Ryan's iPhone - October 12, 2011." Pick that and it will restore to your backup. Do this when you get your iPhone 4S so you will not lose anything. Even though you're restoring, you're getting back, since you're getting the previous settings, notes, contacts, mail and other settings from your old iPhone. You'll still have Siri though! So, restore when you first get it. Also frequently backup your device, as it will be worth it. You can restore from a backup if something goes wrong or save your data for a future update.
    Once you do that, you should have your notes on your new iPhone 4S and iOS 5.
    Please tell me if you need any help.
    I hoped I answered your questions and solved your problem!

  • What is the best way to get a copy of Final Cut 7?  I don't see it on Apple's site anymore and I was told I needed to get ahold of Apple's Pro Divison?

    What's the best way to get a copy of Final Cut 7?

    Amazon.
    Apple stoped selling it officially 20 months ago.

  • I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this?

    I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this? I have found GearGrip's LCD harness so that I can do carry-on onto the plane...  Or maybe use a Pelican Case to do it as a "checked bag"? Or any other suggestions??! Please help!
    Thanks so much!!

    I don't recommend you send the iMac in a checked bag. Might get damaged.
    Check the airlines website for carry on guidelines.
    Or, if you have the original box that the iMac came in, if you have someone who can pick up the iMac for you, send it ahead Fed Ex and insure the package.
    Just make sure the display is covered to protect it. A blanket perhaps.
    Aloha ...

  • What is the best way to get rid of duplicates in the XML data?

    Hi all,
    Please help me with the best way to get rid of the duplicates in the XML data. Will a transform with some stylesheet do the trick? I need to read on the stylesheet first, but please tell me if that is possible. I have to deal with XML data that has tons of duplicate data. Please see one section of an XML file. You can see that for each charge, the same defendant information (address, ID numbers, etc) is included. Having 10 charges is not uncommon, so I would have the same data repeated 10 times. I first thought that I would use some temp tables to do that, but I wonder if there were a better way. Thanks a lot. Please see the data below.
    Ben
    <ChargeDispositionNotification>
         <TriggeredDateTime>2006-06-20T08:21:31-05:00</TriggeredDateTime>
              <NotificationEvent>DispositionAdded</NotificationEvent>
                   <ChargeDisposition chargeKey="622212">
                        <Charge chargeKey="622212" chargeVersionKey="2320743">
                             <ChargeSequenceID>1</ChargeSequenceID>
                             <ChargeFiledDate>2006-06-20</ChargeFiledDate>
                             <ChargeStatuteOrdinanceRule statuteKey="719">
                                  <StatuteOrdinanceRuleCite>609.222.1</StatuteOrdinanceRuleCite>
                                  <SeverityLevel>Felony</SeverityLevel>
                                  <ChargeLegalDescriptionText>Assault-2nd Degree-Dangerous Weapon</ChargeLegalDescriptionText>
                                  <MinnesotaOffenseCode>M1000</MinnesotaOffenseCode>
                                  <ChargeDescriptionText>Assault-2nd Degree-Dangerous Weapon</ChargeDescriptionText>
                             </ChargeStatuteOrdinanceRule>
                             <ChargeSubjectReference partyKey="558357"/>
                             <ChargePlea>
                                  <PleaDate>2006-06-20</PleaDate>
                                  <PleaJudge judgeKey="00553C">
                                       <JudgeName>
                                            <PersonGivenName>Thomas</PersonGivenName>
                                            <PersonMiddleName>William</PersonMiddleName>
                                            <PersonSurName>Bibus</PersonSurName>
                                            <PersonFullName>Bibus, Thomas William</PersonFullName>
                                       </JudgeName>
                                       <JudicialAgencyIdentifier>MN025015J</JudicialAgencyIdentifier>
                                  </PleaJudge>
                                  <PleaDescriptionText>Not guilty</PleaDescriptionText>
                             </ChargePlea>
                        </Charge>
                   <DispositionEvent>
                        <ChargeDispositionDate>2006-06-20</ChargeDispositionDate>
                        <ChargeDispositionJudge judgeKey="00553C">
                             <JudgeName>
                                  <PersonGivenName>Thomas</PersonGivenName>
                                  <PersonMiddleName>William</PersonMiddleName>
                                  <PersonSurName>Bibus</PersonSurName>
                                  <PersonFullName>Bibus, Thomas William</PersonFullName>
                             </JudgeName>
                             <JudicialAgencyIdentifier>MN025015J</JudicialAgencyIdentifier>
                        </ChargeDispositionJudge>
                        <ChargeDispositionText>Convicted</ChargeDispositionText>
                        <ChargeDispositionSeverityLevel>Felony</ChargeDispositionSeverityLevel>
                        <ChargeDispositionComment>This is the disposition comment</ChargeDispositionComment>
                   </DispositionEvent>
                        <CourtCaseNumber>
                             <MNCISCaseNumber>
                                  <CountyNumber>10</CountyNumber>
                                  <CaseType>CR</CaseType>
                                  <YearFiled>06</YearFiled>
                                  <SequenceNumber>367</SequenceNumber>
                             </MNCISCaseNumber>
                             <CaseNumberIdentifier caseNumberKey="10CR06367">10-CR-06-367</CaseNumberIdentifier>
                        </CourtCaseNumber>
                        <CaseDefendant partyKey="558357">
                             <PersonID>325193</PersonID>
                             <PartyName partyKey="558357" currentNameIndicator="true">
                                  <StandardName>
                                       <PersonGivenName>James</PersonGivenName>
                                       <PersonMiddleName>John</PersonMiddleName>
                                       <PersonSurName>Jetson</PersonSurName>
                                       <PersonFullName>Jetson, James John</PersonFullName>
                                  </StandardName>
                             </PartyName>
                             <PartyAddress partyCorrespondenceIndicator="true" partyKey="558357" currentKnownAddress="true" undeliverableIndicator="false">
                                  <AddressUSStandard>
                                       <AddressStreetNumber>abc</AddressStreetNumber>
                                       <AddressPreDirectional>Northeast</AddressPreDirectional>
                                       <AddressStreet>1st</AddressStreet>
                                       <AddressStreetType>Boulevard</AddressStreetType>
                                       <AddressPostDirectional>Southeast</AddressPostDirectional>
                                       <AddressUnit>
                                            <AddressUnitType>Building</AddressUnitType>
                                            <AddressUnitNumber>3333333333</AddressUnitNumber>
                                       </AddressUnit>
                                       <AddressCity>St. Paul</AddressCity>
                                       <AddressState>MN</AddressState>
                                       <AddressZipCode>555551234</AddressZipCode>
                                  </AddressUSStandard>
                             </PartyAddress>
                             <PartyBirthData currentBirthdate="true">
                                  <PersonBirthDate>1991-12-11</PersonBirthDate>
                             </PartyBirthData>
                             <InterpreterNeededIndicator>false</InterpreterNeededIndicator>
                             <PersonAssignedIDDetails>
                                  <PersonSSNID>
                                       <ID>111-00-1101</ID>
                                  </PersonSSNID>
                                  <PersonDriverLicenseID currentDriverLicenseIndicator="true">
                                       <ID>J-111-000-111-001</ID>
                                       <IDJurisdictionText>Minnesota</IDJurisdictionText>
                                  </PersonDriverLicenseID>
                                  <PersonFBIID>
                                       <ID>FBIMNJ001</ID>
                                  </PersonFBIID>
                                  <PersonStateID>
                                       <ID>MNJ0001</ID>
                                  </PersonStateID>
                             </PersonAssignedIDDetails>
                             <PersonPhysicalDetails>
                                  <PersonSexText>Male</PersonSexText>
                             </PersonPhysicalDetails>
                             <RepresentedBy>
                                  <ProSeIndicator>true</ProSeIndicator>
                             </RepresentedBy>
                        </CaseDefendant>
                   </ChargeDisposition>
    </ChargeDispositionNotification>
    <ChargeDispositionNotification>
         <TriggeredDateTime>2006-06-20T08:21:31-05:00</TriggeredDateTime>
              <NotificationEvent>DispositionAdded</NotificationEvent>
                   <ChargeDisposition chargeKey="622213">
                        <Charge chargeKey="622213" chargeVersionKey="2320744">
                             <ChargeSequenceID>2</ChargeSequenceID>
                             <ChargeFiledDate>2006-06-20</ChargeFiledDate>
                             <ChargeStatuteOrdinanceRule statuteKey="717">
                                  <StatuteOrdinanceRuleCite>609.221.1</StatuteOrdinanceRuleCite>
                                  <SeverityLevel>Felony</SeverityLevel>
                                  <ChargeLegalDescriptionText>Assault-1st Degree-Great Bodily Harm</ChargeLegalDescriptionText>
                                  <MinnesotaOffenseCode>B1000</MinnesotaOffenseCode>
                                  <ChargeDescriptionText>Assault-1st Degree-Great Bodily Harm</ChargeDescriptionText>
                             </ChargeStatuteOrdinanceRule>
                             <ChargeSubjectReference partyKey="558357"/>
                             <ChargePlea>
                                  <PleaDate>2006-06-20</PleaDate>
                                  <PleaJudge judgeKey="00553C">
                                       <JudgeName>
                                            <PersonGivenName>Thomas</PersonGivenName>
                                            <PersonMiddleName>William</PersonMiddleName>
                                            <PersonSurName>Bibus</PersonSurName>
                                            <PersonFullName>Bibus, Thomas William</PersonFullName>
                                       </JudgeName>
                                       <JudicialAgencyIdentifier>MN025015J</JudicialAgencyIdentifier>
                                  </PleaJudge>
                                  <PleaDescriptionText>Not guilty</PleaDescriptionText>
                             </ChargePlea>
                        </Charge>
                        <DispositionEvent>
                             <ChargeDispositionDate>2006-06-20</ChargeDispositionDate>
                             <ChargeDispositionJudge judgeKey="00553C">
                                  <JudgeName>
                                       <PersonGivenName>Thomas</PersonGivenName>
                                       <PersonMiddleName>William</PersonMiddleName>
                                       <PersonSurName>Bibus</PersonSurName>
                                       <PersonFullName>Bibus, Thomas William</PersonFullName>
                                  </JudgeName>
                                  <JudicialAgencyIdentifier>MN025015J</JudicialAgencyIdentifier>
                             </ChargeDispositionJudge>
                             <ChargeDispositionText>Convicted</ChargeDispositionText>
                             <ChargeDispositionSeverityLevel>Felony</ChargeDispositionSeverityLevel>
                             <ChargeDispositionComment>This is the disposition comment</ChargeDispositionComment>
                        </DispositionEvent>
                        <CourtCaseNumber>
                             <MNCISCaseNumber>
                                  <CountyNumber>10</CountyNumber>
                                  <CaseType>CR</CaseType>
                                  <YearFiled>06</YearFiled>
                                  <SequenceNumber>367</SequenceNumber>
                             </MNCISCaseNumber>
                             <CaseNumberIdentifier caseNumberKey="10CR06367">10-CR-06-367</CaseNumberIdentifier>
                        </CourtCaseNumber>
                        <CaseDefendant partyKey="558357">
                             <PersonID>325193</PersonID>
                             <PartyName partyKey="558357" currentNameIndicator="true">
                                  <StandardName>
                                       <PersonGivenName>James</PersonGivenName>
                                       <PersonMiddleName>John</PersonMiddleName>
                                       <PersonSurName>Jetson</PersonSurName>
                                       <PersonFullName>Jetson, James John</PersonFullName>
                                  </StandardName>
                             </PartyName>
                             <PartyAddress partyCorrespondenceIndicator="true" partyKey="558357" currentKnownAddress="true" undeliverableIndicator="false">
                                  <AddressUSStandard>
                                       <AddressStreetNumber>abc</AddressStreetNumber>
                                       <AddressPreDirectional>Northeast</AddressPreDirectional>
                                       <AddressStreet>1st</AddressStreet>
                                       <AddressStreetType>Boulevard</AddressStreetType>
                                       <AddressPostDirectional>Southeast</AddressPostDirectional>
                                       <AddressUnit>
                                            <AddressUnitType>Building</AddressUnitType>
                                            <AddressUnitNumber>3333333333</AddressUnitNumber>
                                       </AddressUnit>
                                       <AddressCity>St. Paul</AddressCity>
                                       <AddressState>MN</AddressState>
                                       <AddressZipCode>555551234</AddressZipCode>
                                  </AddressUSStandard>
                             </PartyAddress>
                             <PartyBirthData currentBirthdate="true">
                                  <PersonBirthDate>1991-12-11</PersonBirthDate>
                             </PartyBirthData>
                             <InterpreterNeededIndicator>false</InterpreterNeededIndicator>
                             <PersonAssignedIDDetails>
                                  <PersonSSNID>
                                       <ID>111-00-1101</ID>
                                  </PersonSSNID>
                                  <PersonDriverLicenseID currentDriverLicenseIndicator="true">
                                       <ID>J-111-000-111-001</ID>
                                       <IDJurisdictionText>Minnesota</IDJurisdictionText>
                                  </PersonDriverLicenseID>
                                  <PersonFBIID>
                                       <ID>FBIMNJ001</ID>
                                  </PersonFBIID>
                                  <PersonStateID>
                                       <ID>MNJ0001</ID>
                                  </PersonStateID>
                             </PersonAssignedIDDetails>
                             <PersonPhysicalDetails>
                                  <PersonSexText>Male</PersonSexText>
                             </PersonPhysicalDetails>
                             <RepresentedBy>
                                  <ProSeIndicator>true</ProSeIndicator>
                             </RepresentedBy>
                        </CaseDefendant>
                   </ChargeDisposition>
    </ChargeDispositionNotification>

    ds store wrote:
    ClamXav is only a scanner, it can't remove the MacDefender malware.
    Yes, it can. ClamXav scans and quarantines it. It was updated.
    http://www.reedcorner.net/news.php/?p=98
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 

  • HT4260 I have an AirPort Extreme and a linksys router. What is the best way to get 6-8 wired connections with ac speeds?

    I have an AirPort Extreme and a linksys router. What is the best way to get 6-8 wired connections with ac speeds?
    Appreciate your assistance.

    The answer depends on whether the AirPort Extreme is your main router....or...the Linksys device is your main router.
    In either case, the two devices must connect together using a wired Ethernet connection using CAT5e or CAT6 cabling.
    Any version of the AirPort Extreme produced within the last 5 years will have Gigabit Ethernet ports. In order to get the same speeds from the Linksys router, it will also need to be Gigabit Ethernet capable.
    If you need additional Ethernet ports, you will need to add a Gigabit Ethernet switch to either the AirPort Extreme or Linksys router.
    It is assumed that your other devices connecting to the AirPort Extreme and Linksys router will also have Gigabit Ethernet capability.
    Not sure why you mention "ac" speeds in your post. This relates to wireless connections, not wired.

  • I bought CS6 extended yesterday (yes i did). I have CS4 and lots of photo's in bridge (tagged with keywords). What is the best way to get my photos from bridge cs4 to cs6? Is there a guideline how to go about so I don't loose any of my photos/keywords? Wh

    I bought CS6 extended yesterday (yes i did). I have CS4 and lots of photo's in bridge (tagged with keywords). What is the best way to get my photos from bridge cs4 to cs6? Is there a guideline how to go about: so I don't loose any of my photos/keywords? Who can help?

    The Bridge General Discussion can give you the specifics of transferring your information over to Bridge CS6.

  • When I'm done with my fcp sequence, whats the best way to get it to dvd?

    When I'm done with my fcp sequence, whats the best way to get it to dvd?

    The advice to go to Compressor left out the part that you may want to convert your audio to AC3 becaus ethe MPEG2 bitrate is probably too high for DVD specs.
    This method is in the DVDSP manual and it's in the Compressor manual, both difficult to locate, but easily searchable.
    Here's what I'd do: Export the timeline form FCP in the native sequence settings, self-contained. Bring that self-contained movie into DVDSP and let DVDSP handle the transcode.
    The advice to go to iDVD is even easier.
    bogiesan

  • Whats the best way to get dvd onto 5800

    Peoples,
    I'm strugglin to get DVD onto my noka 5800. It's not obvious in the user manual and looking around the web i need to 'convert' it to the fim on.
    Please does anybody have an easy, fool proof way of doing this??????
    Message Edited by blueleaches on 21-Aug-2009 06:02 PM

    If its possible there should be some walkthrough's on google. 
    http://www.lmgtfy.com/?q=whats+the+best+way+to+get+dvd+onto+5800 

  • Whats the best way to get a big text file in a CLOB variable?

    Hi,
    I have a very premitive type of question.
    I have a big text file, say 30 MB, in a Unix directory (Solaris). I want to get the whole text of that file in a CLOB variable.
    I saw the procedure dbms_lob.loadfromfile/loadclobfromfile. In both these cases, according to the documentation, the target where is collect the data will be a BLOB and not a CLOB. So, I have to convert that blob into a clob.
    If I want to avoid all this conversion process, whats the best way to get a text from a file into a CLOB variable?
    Please suggest.
    Regards

    In addition, LoadFromFile is overloaded to handle both BLOB and CLOB:
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       BLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT
    <BR>
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       CLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT

  • Whats the best way to get the server name in a servlet deployed to a cluster?

              Hi,
              I have a servlet in a web application that is deployed to a cluster, just
              wondering what is the best way to get the name of the node that the server is
              running on at run time??
              Thanks
              

              Please try to modify the following code and test for your purpose: (check Weblogic
              class document for detail)
              import javax.naming.*;
              import weblogic.jndi.*;
              import weblogic.management.*;
              import weblogic.management.configuration.*;
              import weblogic.management.runtime.*;
              MBeanHome home = null;
                   try{
                        //The Environment class represents the properties used to create
                             //an initial Context. DEfault constructor constructs an Environment
                             //with default properties, that is, with a WebLogic initial context.
                             //If unset, the properties for principal and credentials default to
                             //guest/guest, and the provider URL defaults to "t3://localhost:7001".
                             Environment env = new Environment();
                             //Sets the Context.PROVIDER_URL property value to the value of
                             //the argument url.
                             if(admin_url!=null){
                                  env.setProviderUrl(admin_url);
                                  //Sets the Context.SECURITY_PRINCIPAL property to the value of
                                  //the argument principal.
                                  env.setSecurityPrincipal(username);
                                  //Sets the value of the Context.SECURITY_CREDENTIAL property to
                                  //the value of the argument cedentials
                                  env.setSecurityCredentials(password);
                                  //Returns an initial context based on the properties in an Environment.
                                  ctx = env.getInitialContext();
                             }else ctx = new InitialContext();
                             home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
                             ctx.close(); //free resource
                             // or if looking up a specific MBeanHome
                             //home = (MBeanHome) ctx.lookup(MBeanHome.JNDI_NAME + "." + serverName);
                             DomainMBean dmb = home.getActiveDomain(); //Get Active Domain
                             ServerMBean[] sbeans = dmb.getServers(); //Get all servers
                             if(sbeans!=null){
                                  for(int s1=0; s1<sbeans.length; s1++){
                                       String privip = sbeans[s1].getListenAddress();
                                  sbeans[s1].getName();
                             sbeans[s1].getListenPort();
                                                 WebServerMBean wmb = sbeans[s1].getWebServer();
                   }catch(Exception ex){
              "Gao Jun" <[email protected]> wrote:
              >Is there any sample code? Thanks
              >
              >Best Regards,
              >Jun Gao
              >
              >"Xiang Rao" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Sure. You can use the Weblogic management APIs to query ServerBean.
              >>
              >>
              >> "Me" <[email protected]> wrote:
              >> >
              >> >Thanks for your reply, i was hoping to find a better way for example
              >> >a class in
              >> >weblogic API.
              >> >
              >> >Thanks
              >> >
              >> >"Xiang Rao" <[email protected]> wrote:
              >> >>
              >> >>Physical: InetAddress.getLocalHost().getHostName()
              >> >>Weblogic: System.getProperty("weblogic.Name");
              >> >>
              >> >>
              >> >>"Me" <[email protected]> wrote:
              >> >>>
              >> >>>Hi,
              >> >>> I have a servlet in a web application that is deployed to a
              >cluster,
              >> >>>just
              >> >>>wondering what is the best way to get the name of the node that
              >the
              >> >>server
              >> >>>is
              >> >>>running on at run time??
              >> >>>
              >> >>>Thanks
              >> >>
              >> >
              >>
              >
              >
              

Maybe you are looking for

  • I reset my ipod touch (3rd gen 32GB) and now when I connect it to itunes I cant sync it because it freezes my itunes! What do I do? D:

    I dont know what to do! D:

  • Mac Mini reformatting problem

    Hi all... I'm trying to wipe clean my mini and re-install Tiger for a friend who is buying it. When the computer restarts with the Tiger disk inserted I receive a black screen with the following message. No debugger configured - dumping debug informa

  • Ipod wont charge or reset

    both mine and my sisters ipod nano 2gb wont charge reset update, anything, i turn it on, 2 secs later it turns off, then i try to charge and its a picture of a battery with lightning through it, god i hate ipod

  • Get rid of block box

    Hello, Somehow, a black box has showed up on my screen, it tells me things that I already know, like where I am.  I also has a nasty habit of skipping a outling of a box around the screen I DO NOT CARE WHAT IT IS I JUST WANT IT GONE.  Can somebody hw

  • Java Heap space management

    I have made a java Frame application that requires 200MB of heap space to execute. Now, I want to port that application onto an applet. The default heap space of java is 32 MB and thus my program will not execute. can i increase the heap space on the