Query VM for number of object instances, possible?

I have a super duper java guru question:
Given a class object (or equivalently a class name and it's respective class loader), is there a way to determine if any instances of this class exist in the VM? I don't care how many, I just want to know if there are any at all. Perhaps another way to pose this question, do any
events get thrown when no more instances of a particular class exist?
Joe

No, there's no way for you to tell that unless you do some programming.

Similar Messages

  • Interval 01 was not created for number range object HRTEM_REFN

    Dear expert!
    Now, I'm getting some issues in Training and event management module.
    - The first, I created business event
    - Second, I process to book for business event by tcode: PSV1 --> book --> book/payment info --> activity allocation.
    But when I was booking, the system displayed error: "Interval 01 was not created for number range object HRTEM_REFN"
    Help me, please!
    Best regards, Huy!

    Go to the customization as below
    Training and event mgt>Basic settings>Number range maintanence>Define number ranges for External operation
    and maintain number ranges as 01 Internal
    Hope ur problem will solve
    with regards
    partha

  • ""  No authorization for number range object type GTIN and activity SHOW ""

    While creating number range in number  range administration for GTIN system showing the error
    ""  No authorization for number range object type GTIN and activity SHOW ""
    Pls help me to solve this issue

    Hi ,
    Please check roles for user assigend as  [ This is for super administrator ]
    SAP_AIN_ADMINISTRATOR
    SAP_AIN_OER_ADMINISTRATOR
    SAP_AIN_SUPER_ADMINISTRATOR
    SAP_AIN_SUPERVISOR
    SAP_AIN_WORKER
    and profiles assgined as
    SAP_ALL          
    SAP_NEW          
    Hope it will helps
    Thanks .,
    V.Rangarajan

  • No authorization for number range object type BTI and activity SHOW

    Hi All,
    When I try to execute
    SAP Easy Access screen - > Auto-ID Infrastructure -> Master data -> Number Ranges -> Number Range Administration
    on the next web window when I select the object type BTI , it comes up with the error
    Number range table not maintained for object BTI in customizing  
      No authorization for number range object type BTI and activity SHOW  
    I am using AIN 5.1 .  Is this an authorization issue ?. If so which all roles I should give to the user?  IF you have any idea about this please share some tips.

    Hi Sahad,
    Only few number range object types are available in the standard system:
    Follow the link for help .
    http://help.sap.com/saphelp_autoid2007/helpdata/EN/45/e2240c7abb56dde10000000a114a6b/frameset.htm
    Follow the for setting up the others.
    http://help.sap.com/saphelp_autoid2007/helpdata/EN/45/e2240c7abb56dde10000000a114a6b/frameset.htm

  • Error when creating interval for number range object

    Hi,
           I am trying to transport my BW stuff from QA to Production and I am getting the following error in the transport logs. The info objects are inactive in RSA1.
    Start of the after-import method RS_IOBJ_AFTER_IMPORT for object type(s) IOBJ (Activation Mode)
    Characteristic YRESD: Error when creating interval for number range object BIM0000396
    Can some body advise me what's wrong? Is something need to be maintained in number ranges?
    Also when I am checking the objects in RSA1, I am getting a message saying "source system WD110 does not exist", WD110 is our dev system. How can I change the source system after transport?
    Thanks.
    Edited by: Raj G on Mar 20, 2008 11:38 AM

    Also when I am checking the objects in RSA1, I am getting a message saying "source system WD110 does not exist", WD110 is our dev system. How can I change the source system after transport?
    Which system are you checking this?
    refer: Re: Transport Source Systems from DEV to Testing for step to map the source systems for transport

  • BPEL Client API - Query Domain for Number of Active Threads ?

    Hi,
    Is there a method to query the number of active threads within the domain ? i.e. the same value displayed under Thread Allocation Activity shown on http://localhost/BPELConsole/default/domain.jsp?mode=thread
    I've browsed the API docs but can't find a way to do this... I might have missed something thought.
    Cheers,
    Rob

    Thanks Marc.
    How would I go about getting a domain handle ? The bit I'm stuck on in obtaining the initial authenticated connection to the server. The ngThreadInfo code does this:
    Server server = ServletUtils.getServer( request, response );
    String token = server.getServerAuth().getToken();
    and I guess the request/response vars provide the security context in which the getServerAuth operates ?
    Which API functions can I embed in a BPEL process to connect to the server and subsequently obtain the domain handle ?
    Cheers,
    Rob J.

  • Query latency vs number of partitions

    I am trying to measure the average latency per object retrieval using the query approach, and what I am finding is that as the number of instances of the server (a server being a single jvm running DefaultCacheServer with backup-count set to 1, and partition-count set to 1021) increases, the latency increases significantly as shown in the results below:
    Latency (microseconds) for Number of server instances
    Objects 2 4 8 16
    In Cache srvrs srvrs srvrs srvrs
    1K 593 730 889 1175
    10K 592 720 880 1206
    50K 580 724 879 1200
    100K 585 726 877 1204
    The query code is as follows:
    final Filter filter = new EqualsFilter(idExtractor, key);
    final Filter limitedFilter = new LimitFilter(filter, 1);
    final Set spotPricesKeys = cache.keySet(limitedFilter);
    if (spotPricesKeys != null && spotPricesKeys.size() > 0){
         spotPrice = (SpotPrice) cache.get(spotPricesKeys.iterator().next());
    and
    private static ValueExtractor idExtractor = new KeyExtractor("intValue");
    Any idea why the latency is increasing with the added number of server instances?
    Thanks
    Adsen

    Partitioning strategies is an "advanced" feature of Coherence. It works much like a hash function but instead of a hash code it calculates the partition number that will be used for each key. You can use more or less any deterministic algorithm based only on key information. Lets assume that you have a cache with strings as keys (representing for instance a persons name) and you would like to partition based on the first letter it could look something like this (this is just an example - in production code you would like to make sure the algorithm statistically makes as even use of all the partitions that you have in your cluster!):
    public class MyPartitionStrategy implements KeyPartitioningStrategy, Serializable {
    private PartitionedService partitionedService;
    public MyPartitionStrategy() {
    public void init(final PartitionedService partitionedService) {
    this.partitionedService = partitionedService;
    public int getKeyPartition(final Object key) {
    if (key instanceof String) {
    return ((String) key).charAt(0) % (partitionedService.getPartitionCount() + 1);
    } else {
    return key.hashCode() % (partitionedService.getPartitionCount() + 1);
    With this filter you would know that all keys starting with the same first letter ends up in the same partition. You would specify the use of this filter once in the coherence configuration (dont remember the element to use on top of my head though).
    Now assume that you for some reason want to do some query that only should apply to entries with a key starting with the letter 'a' you could do that with a PartitionedFilter (you would have to write some code that determines what partition the key 'a' would end up if it existed and then restrict the query to that single partiton). With this solution Coherence will only send the request to the single node holding the primary for that one partition holding all the "axxxx" keys and not to all the nodes in the cluster making the query scale close to linerary no matter how many nodes you have!
    A problem when the number of partitions grow is to find a partitioning strategy that allocates a useful set of objects into a single partition. If you for instance have like 4000+ partitions and would like to divide addresses based on state in order to perfrom queries against all of your customers in a particular state there is no obvious way to do that since the number of states is much smaller than the number of partitions :-(
    This kind of partitioning can however be very useful in many cases (we have used it to good effect in my current project).
    In produktion code it is often some part of a composite key that is useful as a key partitioning criteria and you could then for instance return the standard hash code of that key part modulus he partition count.
    Another possibly useful feature you may look at is when it comes to limiting the number of nodes invloved in queries is the KeyAssociatedFilter (if you use key association at all in your cache).
    /Magnus

  • Cache an LDAP query result in a Map Object

    Is there a way to perform a single LDAP query and store it in some type of an indexed list Object in memory. Specifically I need to populate both LDAP manager and managerFullName for an LDAP user object based on an employeenumber query.
    I don't want to query LDAP for every user object. I would like to submit one search such as (objectclass=inetorgperson) and store the result in an indexed list in memolry using employeenumber as the key. This way I only need to query the indexed list object for each user entry.
    Is this possible?

    No this is not possible.
    The only way to do this is to use a java class you write yourself. But and a major but: if you do not stay in the same place in IDM (form or workflow) you will lose the content because the object will be garbage collected when you change.
    The other thing is: how much will you gain? The ldap server can probably return the result far quicker then you can iterate through the list to find the entry.
    WilfredS

  • No SID Number Range Object Found

    Hi,  Just curious..  I created an infoobject and I found that there is no number range object BIM*** for the sid.  When I do an RSRV I get the below listed message:
    Any ideas what this means?
    Characteristic ZSOUTLET2 does not get its SIDs by using a number range object
    Message no. RSRV276
    Diagnosis
    Characteristic ZSOUTLET2 has another SID award mechanism by using a number range object. Therefore, this test is not meaningful for ZSOUTLET2.

    If the InfoObject is of type DATS, TIMS or NUMC (with length < 9) no need for number range object, because the characteristic values are equal to the SIDs --> SIDs are retrieved by using the characteristic values.
    Hope this helps.
    DN

  • Querying for large number of objects... searchspec limitation

    As part of a product i'm developing i may come across a scenario where i need to query for 100+ specific objects based on ids.
    I know the query input for WS 2.0 has a "searchspec" string field, but based on the sheer number of specific objects i need to query for i'm afraid the string may eventually get too large.
    Is there a way around this? Can i send multiple individual queries in a batch request? Can i add more than one search object to a single query page request? Anything?
    Thanks!
    -Kevin

    A few options available using the WS v2.0 Query methods:
    1. Use Arguments like page size and startrownumber arguments. This will allow you to specify the pagesize of the recordset to be returned and also the starting row number.
    2. The searchspec is a powerful argument and it supports a set of binary and unary operators. Refer the Ondemand user guide for a more complete set of operators supported by searchspec. To narrow the results of your query, you could use the "AND" operator between 2 or more fields in your object query.
    Hope this helps.
    Jaya

  • How to find the number of references created for a given  object ??

    How to find the number of references created for a given object in a big application environment.
    That means, if i give any object name (of my application) as input, then how can i find the[b] number of references created for that particular object ??

    Please do not post the same question multiple times.
    As for your original question, there is no direct way to do it.
    Especially not the way you phrased it,
    since objects don't have "names".
    Applications also don't have "names".
    They have classes and instances.
    Also, there are 2 related issues, and I'm not sure which one is the one you asked.
    #1. Finding the number of references to the same object.
    Eg.
    Map<String,String> a = new HashMap<String,String>();
    Map<String,String> b = new HashMap<String,String>();
    Map<String,String> c = a;In this case, there are only 2 objects.
    The first object has (at least) 2 references pointing to it.
    The second object has (at least) 1 reference pointing to it.
    (There may be more, if the HashMap library keeps
    references to these things, or if the HashMap object has
    some internal cyclic references...)
    If you're asking this, then it can't be done.
    It's an active research topic in universities
    and software research labs, called "alias analysis".
    Type it in google, and you'll see people are working hard
    and having little success so far.
    #2. Finding the number of instances created from a class.
    In this case, what you have to do is to add a counter to
    the constructor of the class. Every time an object is constructed,
    you increment the counter. Like this:
       class MyClass
           public static int counter = 0;
           public MyClass( )  { counter++; }
        // Then later in your program, you can do this:
        MyClass a = new MyClass();
        MyClass b = new MyClass();
        System.out.println(MyClass.counter); // It should show 2Note: you won't be able to do this to every class in the system.
    For every class you care about, you have to modify its constructor.
    Also: when an object is deleted, you won't always know it
    (and thus you won't always be able to decrement the counter).
    Finalizers cannot always work (read Joshua Bloch's
    "Effective Java" book if you don't believe me), but basically
    (1) finalizers will not always be called, and
    (2) finalizers can sometimes cause objects to not be deleted,
    and thus the JVM will run out of memory and crash

  • Number Range Object for a Infoobject

    Hi Gurus,
    Can anyone explain me what is the significance of Number Range Object for a perticular infoobject and what do you mean by Buffering of those Number Range Object...
    Your help will be appreciated..
    Thanks a lot in advance..
    Thanks,
    Shalaka.

    Hai Shalaka,
    The number range buffer is used to increase performance when assigning
    numbers. Instead of fetching the numbers each time from the database,
    a single access to the buffer suffices. Only when the buffer is empty,
    is it refilled from the database (table NRIV).
    Use of the buffer has the following benefits:
    · Accessing the main memory is a thousand times quicker than accessing
    the database. Speed is particularly important for applications that
    assign numbers frequently.
    · Database accesses are always subject to the database transaction
    mechanism. Once an application has assigned a number for one user, a
    second user cannot assign a number until the first user has executed a
    commit operation on the database. The application blocks further
    assignment, and the second user has to wait, until the commit has been
    executed.
    · The number range buffer can also prevent deadlock situations, which
    may arise from assigning different numbers in a different order.
    Since the SAP kernel accesses table NRIV directly for the number range
    buffer, the structure of the table must never be changed. This also
    applies when adding new fields.
    We can set number range buffering inSNRO t code.
    Loading Master data - The number ranges buffer for the SID's resides
    on the application server and reduces DB server accesses. If you set
    e.g. the number range buffer for one InfoObject to 500, the system
    will keep 500 sequential numbers in the memory and need not access the
    database.
    #####>>> whenever master data loading is done system creates SIDs, &
    to create SIDs system look into a specific table, check the latest
    number & generate the next no in the series, so to check this latest
    no for every time ( every record) system needs to go back to database
    table & generate the next no in series. when I do the buffering I
    provide the whole series to system at application level so it need not
    to go back to table to check the latest no & generate the next one. It
    just picks up the next in available on application server.
    >>>####
    Please refer - SAPnote 130253
    Loading Transcation data - The number range buffer for the dimension
    ID's resides on the application server and reduces DB server accesses.
    For example, if you set the number range buffer for one dimension to
    500, the system will keep 500 sequential numbers in memory and need
    not access the database
    If you load a significant volume of transaction data (e.g., initial
    load), increase the number range buffer. If possible, reset it to its
    original state after the load in order to minimize unnecessary memory
    allocation
    Hope this information helps u....
    Asign points if helpfull
    regards
    KP

  • Maximum number of field values for an Authorization object

    Hello Experts,
    What is the maximum number of field values can be put into the role, Is there any restriction for number of values in any authorization field?
    I have put 326 values for field OBJTYPE in authorization object S_DEVELOP but not able to generate the role it is showing error.
    I know I can split the values in two or more instance but wanted to know if there any other way out for this (without creating more instances)
    Thanks
    DK

    If the values for OBJTYPE are not uniquely the same, then the system will not merge them - so nothing will be lost.
    Here is another trick for you: Choose one of the transactions in the role (or create a "symbolic" one for it") where you want to have the OBJTYPE proposed automatically from. Now maintain one or two of them in SU24 and then download it to your PC. Now from the F4 value range of the OBJTYPE, add all of those values you want via copy&paste into the file and then upload into SU24 again. A read old / merge new in PFCG will then swing all the values in for you.
    Single values are always better, as you do not know what else is hidden in the range or might be added in future. It is however common to see FROM / TO ranging around values such as DEBUG and FUGR although all aspects of S_DEVELOP are dangerous - even in display mode.
    Cheers,
    Julius

  • Increase the number of portions in process for each conversion object

    I experts,
    I configured SAP TDMS 3.0 with SP 14 to transfer test data from QAS to DEV (both is ECC 6.0) for the first test with TDMS TIM (Time Based Reduction).
    The data transfer phase is still running (99% - 60hs running). We analyzed the Display Runtime Information report and see that objects of conversion with similar calc. records and calc. GBytes have very different the Net Runtime.
    TMDS currently is working with four objects of conversion, processing a portion of each.
    Conversion objects that are running are:
    - Z_LTBP_002
    - Z_TSEGE_002
    - Z_VEVW_002
    - Z_YST27_002
    We check in the receiver system, and we see that is use only one DIA process to update the each table.
    How can increase the performance of the update? Is correct that use only 1 DIA process for this??
    Can I increase the number of portions in process for each conversion object?
    Any help is greatly appreciated.
    Regards,
    Sergio

    Hi,
    Check SAP Note 916763 - TDMS performance composite SAP note
    Note 890797 - SAP TDMS - required and recommended system settings
    Thanks
    Sunny

  • SSRS Error : Query execution failed for dataset 'dataSet'. (rsErrorExecutingCommand) Semantic query execution failed. Invalid object name 'RPT.*********'. (rsSemanticQueryEngineError)

    I am new to SSRS and I am trying to migrate reports from 2008 to 2012. As I have so many reports to migrate, I simply got the back up of ReportServer,
    ReportServerTempDB, and Encryption Key and restored them to test environment. I made necessary configuration from RS configuration tool. I am able to see the reports now when I browse //hostname/reports. But when I open any particular report I am getting some
    error.
    · An error has occurred during report processing.
    (rsProcessingAborted)
    Query execution       failed for dataset 'dataSet'.
          (rsErrorExecutingCommand
    Semantic query        execution failed. Invalid object name
           'RPT. ******'. (rsSemanticQueryEngineError)
    ****** - I am assuming this is a custom data class.
    Does anyone have insight on this? or any better way that I can migrate the reports to new server with less efforts.
    I don’t have the reports solution file to deploy the reports, so I have followed backup and restore process.

    Hi Kishore237,
    According to your description, you migrated some reports from Reporting Services (SSRS) 2008 to 2012. Now you get error when accessing the reports on SSRS 2012. Right?
    In this scenario, did you modify the report data source in database after migration? You can try to open the report in Report Builder or Report designer and check the report dataset. If you can preview the report in Report builder or Report designer,
    please try to redeploy the report to Report Server. If it is still not working, please try to restore the database from backup. And for migrating reports, please follow the "Content-Only Migration" in the link below:
    http://msdn.microsoft.com/en-us/library/ms143724(v=sql.110).aspx
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

Maybe you are looking for