Getting list of cache names

I have been using this code to get the list of all the cache names of my cluster :
Cluster cluster=CacheFactory.ensureCluster();
for (Enumeration<String> services = cluster.getServiceNames(); services.hasMoreElements(); )
     String sName = (String) services.nextElement();
     System.out.println("Service:"+sName);
     Service service=cluster.getService(sName);      
     if (service instanceof CacheService){
          CacheService cService=(CacheService)service;
          Enumeration<String> caches = cService.getCacheNames();           
          for (caches = cService.getCacheNames(); caches.hasMoreElements();){
               // add caches.nextElement() in a list
It is working fine but in order to access multiple clusters I have to use Coherence proxy/extend.
When I use proxy/extend, the code above does not work anymore. I explain: when using proxy/extend, cluster.getServiceNames() returns Management and Cluster but does not return the Cache Services anymore.
I have tried to get a cluster object in a different way :
((InvocationService) CacheFactory.getConfigurableCacheFactory().ensureService("ExtendTcpInvocationService")).getCluster;
where ExtendTcpInvocationService is defined with <remote-invocation-scheme> but the result is the same.
To sum up : I would like to get the list of all my cache names in a multi-cluster application ; is it possible?

Thank you for the clue.
I tried executing a Query with an Invocable object but I am getting some other exception:
(Wrapped) java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.app.data.ListTask
at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Unknown Source)
     at java.io.ObjectInputStream.resolveClass(Unknown Source)
     at com.tangosol.io.ResolvingObjectInputStream.resolveClass(ResolvingObjectInputStream.java:66)
     at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
     at java.io.ObjectInputStream.readClassDesc(Unknown Source)
     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
     at java.io.ObjectInputStream.readObject0(Unknown Source)
     at java.io.ObjectInputStream.readObject(Unknown Source)
     at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2217)
     at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2348)
     at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2291)
     at com.tangosol.io.DefaultSerializer.deserialize(DefaultSerializer.java:74)
     at com.tangosol.coherence.component.net.extend.Channel.deserialize(Channel.CDB:15)
     at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3316)
     at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2604)
     at com.tangosol.coherence.component.net.extend.messageFactory.InvocationServiceFactory$InvocationRequest.readExternal(InvocationServiceFactory.CDB:5)
     at com.tangosol.coherence.component.net.extend.Codec.decode(Codec.CDB:29)
     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.decodeMessage(Peer.CDB:25)
     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:54)
     at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
     at java.lang.Thread.run(Unknown Source)
From what I understand, the "server" excecuting the "run" from my invocable does not know the invocable class (ListTask).
I suppose I have to put this class in the server classpath?
Is there any way to have the result hoped without making any modification to the "server" ?

Similar Messages

  • Connecting to cache and getting list of cache names

    I have a cache cluster (server) running on my local machine with these settings:
    ===============
    -server
    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=28000
    -Dcom.sun.management.jmxremote.authenticate=false
    -XX:+HeapDumpOnOutOfMemoryError
    -Xmx1000M
    -Dfire.disable.cachestore=true
    -Dtangosol.coherence.wka=${hostname}
    -Dcom.sun.management.jmxremote
    -Dfire.tcp.extend.port=9199
    -Dtangosol.coherence.management=all
    -Dtangosol.coherence.management.remote=true
    -Dtangosol.coherence.cacheconfig=fire-cache-config.xml
    -Dtangosol.coherence.override=fire-cluster-config.xml
    -Dtangosol.join.timeout=1000
    -Dtangosol.coherence.ttl=0
    -Dlog4j.configuration=fire-log4j.xml
    -Dfire.coherence.storage.dir=${storage}
    ===============
    I am trying to connect to this cluster from another process (client), running on my local machine, with these settings:
    ===============
    -Dtangosol.coherence.distributed.localstorage=false
    -Dtangosol.coherence.wka=${hostname}
    -Dtangosol.coherence.management=all
    -Dtangosol.coherence.management.remote=true
    -Dcom.sun.management.jmxremote
    -Dtangosol.coherence.cacheconfig=fire-cache-config.xml
    -Dtangosol.coherence.override=fire-cluster-config.xml
    ===============
    The client process fails with the following error message:
    ===============
    java.lang.IllegalStateException: SafeCluster has been explicitly stopped or has not been started
    ===============
    When the following line of statement is executed:
    ===============
    Cluster cluster = CacheFactory.getCluster();
    cluster.getServiceNames(); // exception thrown
    ===============
    The server is running, and another process (written by someone else) is able to connect to it. The settings I am running client with have been validated against the settings that the working process is using. But, no luck.
    Oracle Coherence Version 3.3.1/389
    OS: Windows XP Pro
    Env: Eclipse 3.4 / sun-jdk-1.6.06
    I have been looking around for any intelligent sign of clue about whats going on. But have not been able to find anything useful on google or these forums or the javadoc API.
    Any help / info / pointers towards getting the client to connect to the server would be greatly appreciated.
    Thanks in advance
    Ajay

    Yes, I have. It does not get me access to caches in the cluster. ensureCluster does get me service names, but return null when I call cluster.getService(name);
    Do you have any reason to recommend ensureCluster instead of getCluster?
    My eventual goal is to get a list of all caches. If you have a better way to get a list of all caches, please do recommend / point me in the right direction.
    Thanks
    Ajay

  • How to get list of file names from a directory?

    How to get list of file names from a directory?
    Please help

    In addition, this:
    String filename = files;Should be this:
    String filename = files;
    That's just because he didn't use the "code" tags, so [ i ] made everything following it become italicized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get List Item attachments name without write any custom code or any database query?

    Hi,
    How to get List Items attachments name without write any custom code or any database query?

    You can get it from Rest,
    There are 2 options,
    1) create a 'Result Source' which has a search query for that List which has attachments 
     - Use rest query to get the 'Filename' , it will have the attachment file name 
    For example, if the result source id is : 73e6b573-abf8-4407-9e5f-8a85a4a95159 , then the query will be 
    http://[site URL]/_api/search/query?querytext='*'&selectproperties='Title,Path,FileExtension,SecondaryFileExtension,Filename'&sourceid='73e6b573-abf8-4407-9e5f-8a85a4a95159'&startrow=0&rowLimit=100
    You can refine the query, be giving proper 'querytext'
    2) Use the List rest api
    For example if your list guid is :38d524a1-e95c-439f-befd-9ede6ecd242e
    You can get he attachments for 1st item using this 
    http://[Site URL]/_api/lists(guid'38d524a1-e95c-439f-befd-9ede6ecd242e')/items(1)/AttachmentFiles
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • Getting list of document name in a container

    Hi,
    I am trying to get list of all document names in a container using the following code in PHP:
    http://dpaste.com/25409/
    but I am getting an error as listed in the above link.
    Any idea? I searched on Google but couldnt get any definitive answer.
    Thanks.

    Hello,
    Try:
    for $doc in collection() return dbxml:metadata('dbxml:name',$doc)
    Regards,
    George

  • Getting list of domain names on NT, and authenticating user

    Hello, I want to make an class that will check the user login name and password on a NT domain, the class will show a screen with 2 fields, username and password, and a combobox, with all domain names, on this screen the user will type his username and password and choose a domain to login to, the class will then check if he can login to that domain.
    Currently the problem I have is that I couldn�t find a way to get a list of domain names.
    And after I get that list, what is the best way to authenticate the user ?
    Thanks a lot in advance for any help.

    hi,
    you can ask for username, password by running this code:
    String auth = httpRequest.getHeader("Authorization");
    if (auth == null)
    httpResponse.setStatus(httpResponse.SC_UNAUTHORIZED);
    httpResponse.setHeader("WWW-Authenticate", "NTLM");
    httpResponse.flushBuffer();
    return;
    if (auth.startsWith("NTLM "))
    byte[] msg = new sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
    int off = 0, length, offset;
    if (msg[8] == 1)
    byte z = 0;
    byte[] msg1 = {(byte)'N', (byte)'T', (byte)'L', (byte)'M', (byte)'S', (byte)'S', (byte)'P',
    z,(byte)2, z, z, z, z, z, z, z,(byte)40, z, z, z,
    (byte)1, (byte)130, z, z,z, (byte)2, (byte)2,
    (byte)2, z, z, z, z, z, z, z, z, z, z, z, z};
    httpResponse.setHeader("WWW-Authenticate", "NTLM " +
    new sun.misc.BASE64Encoder().encodeBuffer(msg1));
    httpResponse.sendError(httpResponse.SC_UNAUTHORIZED);
    return;
    else if (msg[8] == 3)
    off = 30;
    length = msg[off+17]*256 + msg[off+16];
    offset = msg[off+19]*256 + msg[off+18];
    String remoteHost = new String(msg, offset, length);
    length = msg[off+1]*256 + msg[off];
    offset = msg[off+3]*256 + msg[off+2];
    String domain = new String(msg, offset, length);
    length = msg[off+9]*256 + msg[off+8];
    offset = msg[off+11]*256 + msg[off+10];
    String username = new String(msg, offset, length);
    You can put this code in youe servlet or in a filter.
    I am also strucked with similar problem.
    With this code i am getting the window to enter loginId/password but i am not able to authenticate it.
    If you have found any solution to authenticate the user please help me.
    i am really strucked.
    thanks in advance
    Pamjoshua

  • Get list of employees names in WD

    Hi all,
    i created an input field in my main view, and after running it in WEB if the user click on F4 help, he should get a list of all employees names,
    please show me how can i do this.
    thank you all

    Hi,
    You can do it in any application, below are the links,
    http://help.sap.com/saphelp_erp2005/helpdata/EN/30/d7fa41c915da6fe10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/9ef8c99b5e3c5ce10000000a421937/content.htm
    https://wiki.sdn.sap.com/wiki/display/Snippets/OVS%20search%20help
    Hope this will be useful.
    Regards,
    Meera

  • Getting list of view`s attributes names

    Hi experts,
    Is it possible to get list of attributes names on a view? After calling
    create_view(...)
    in controller I would like to iterate through all view`s attributes and fetch data from model for all attributes with the same name on view and model. So, I need a way how to get information about all attributes on a view.
    Best regards, Maksim Rashchynski.

    Hi Maksim Rashchynski ,
    You should use model data binding to cater your requirement.    What you have to do is define all your attributes in model and just define a reference in page attributes of your view using
    type ref to your_model
    now in your View code like this
    <htmlb:label for    = "Myfield"
                     design = "EMPHASIZED" />
        <htmlb:inputField id      = "fldid"
                          value   = "//model/field1"
                           disabled ="False"></htmlb:inputField>
    what will happen after this is you can easily get your data to your view directly from model and viceversa.
    Hope it helps else revert back.
    Regards
    Amit Kumar

  • How can I get a list of database names from environment

    Hi,
    How can I get a list of database names from environment.
    I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
    I use java interface, is it supported?
    Thanks.

    Hello,
    I don't know if it would work for you, but have you checked the db_archive utility at:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
    Check the -s option.
    Thanks,
    Sandra

  • Hi - When I go into Contacts and type a letter in the search bar to get to last names that begin with that letter I get a list of random names that don't correlate to the letter. My settings are fine.  Help ?

    Hi. When I go into my contacts and type a letter in the saerch bar to get to a list of last names that begin with that letter I get a list of random names that don't begin or end with the letter.  My Settings appear fine.  Any insights would be greatly appreciated.  Cheers Bill

    The search bar is not designed to take you to names beginning with the letter you put in. If you want to do that, use the letters down the side. In the search bar, the device will return results for all contacts that have that have that letter in them. If you type a couple of letters of the name, you'll find what you want faster. Once you get used to how it works, it's quite efficient.
    Best of luck.

  • How do I get a list of cameras names from MAX to use in a CVI app?

    I wish to avoid any confusion in selecting cameras to use in my CVI application, so I'm looking for a way, from within my app, to get the list of camera names as set up in MAX. Then I can populate a listbox and the user can choose their camera without having to guess or refer to an external listing for the MAX name. The selected name will then be passed to IMAQdxOpenCamera.
    Thanks!

    Found it! (Should have looked in the hardware boards first, but it seemed to be a software question.) Anyway, use IMAQdxEnumerateCameras.

  • JAVA-SAX-Xml how to get simple tag element names to a list

    i need to get the simple tag names(here it is name,price,aname,city) in to a list i have heard about SAX parser event driven it walks throgh the xml step by step when a new tag occurs it will parse etc....
    but i am unable to get the only sampletag names into a Arraylist
    i have heard about a method getElementBytagName()
    i dont want to write a code for particular xml because later on i have to retrive same simple tags from another xml say employee.xml
    please provide a generic code which will retrive the simple tag names and stores into a Arraylist
    the real xml i want to store only simple elements into array list
    <ProvisionViewingCardprovisionViewingCar>
    <orderId>1</orderId>
    <numberOfCards>2</numberOfCards>
    <customerSite>
    <customerSiteSystemId>3</customerSiteSystemId>
    <customerSiteID>4</customerSiteID>
    <customerSiteState>5</customerSiteState>
    <parentCustomerSiteID>6</parentCustomerSiteID>
    <businessName>7</businessName>
    <migratedCustomerID>8</migratedCustomerID>
    <businessContactInformation>
    <contactID>9</contactID>
    <emailInfo>
         <additionalEmailAddress>10</additionalEmailAddress>
         <emailAddress>11</emailAddress>
    </emailInfo>
    <communicationPreference>12</communicationPreference>
    <mobileNumber>13</mobileNumber>
    <faxNumber>14</faxNumber>
    <contactExceptions>15</contactExceptions>
    <telephoneNumber>16</telephoneNumber>
    </businessContactInformation>
    <address>
    <addressID>17</addressID>
    <addressLine1>18</addressLine1>
    <addressLine2>19</addressLine2>
    <addressLine3>20</addressLine3>
    <town>21</town>
    <county>22</county>
    <postCode>22_1</postCode>
    <country>23</country>
    </address>
    <person>
    <personID>24</personID>
    <title>25</title>
    <firstName>26</firstName>
    <middleName>27</middleName>
    <dataProtectionPreference>28</dataProtectionPreference>
    <surname>29</surname>
    <dateOfBirth>30</dateOfBirth>
    <position>31</position>
    <!--1 or more repetitions:-->
    <authority>32</authority>
    <address>
    <addressID>33</addressID>
    <addressLine1>34</addressLine1>
    <addressLine2>35</addressLine2>
    <addressLine3>36</addressLine3>
    <town>37</town>
    <county>38</county>
    <postCode>39</postCode>
    <country>40</country>
    </address>
    Regards/
    Suman.

    i need to get the simple tag names(here it is name,price,aname,city) in to a list i have heard about SAX parser event driven it walks throgh the xml step by step when a new tag occurs it will parse etc....
    but i am unable to get the only sampletag names into a Arraylist
    i have heard about a method getElementBytagName()
    i dont want to write a code for particular xml because later on i have to retrive same simple tags from another xml say employee.xml
    please provide a generic code which will retrive the simple tag names and stores into a Arraylist
    the real xml i want to store only simple elements into array list
    <ProvisionViewingCardprovisionViewingCar>
    <orderId>1</orderId>
    <numberOfCards>2</numberOfCards>
    <customerSite>
    <customerSiteSystemId>3</customerSiteSystemId>
    <customerSiteID>4</customerSiteID>
    <customerSiteState>5</customerSiteState>
    <parentCustomerSiteID>6</parentCustomerSiteID>
    <businessName>7</businessName>
    <migratedCustomerID>8</migratedCustomerID>
    <businessContactInformation>
    <contactID>9</contactID>
    <emailInfo>
         <additionalEmailAddress>10</additionalEmailAddress>
         <emailAddress>11</emailAddress>
    </emailInfo>
    <communicationPreference>12</communicationPreference>
    <mobileNumber>13</mobileNumber>
    <faxNumber>14</faxNumber>
    <contactExceptions>15</contactExceptions>
    <telephoneNumber>16</telephoneNumber>
    </businessContactInformation>
    <address>
    <addressID>17</addressID>
    <addressLine1>18</addressLine1>
    <addressLine2>19</addressLine2>
    <addressLine3>20</addressLine3>
    <town>21</town>
    <county>22</county>
    <postCode>22_1</postCode>
    <country>23</country>
    </address>
    <person>
    <personID>24</personID>
    <title>25</title>
    <firstName>26</firstName>
    <middleName>27</middleName>
    <dataProtectionPreference>28</dataProtectionPreference>
    <surname>29</surname>
    <dateOfBirth>30</dateOfBirth>
    <position>31</position>
    <!--1 or more repetitions:-->
    <authority>32</authority>
    <address>
    <addressID>33</addressID>
    <addressLine1>34</addressLine1>
    <addressLine2>35</addressLine2>
    <addressLine3>36</addressLine3>
    <town>37</town>
    <county>38</county>
    <postCode>39</postCode>
    <country>40</country>
    </address>
    Regards/
    Suman.

  • How to get list of active users with the details like samaccountname, name, department, job tittle, email in active directoy?

    how to get list of active users with the details like samaccountname, name, department, job tittle, email in active directoy?

    You can use third party software True Last Logon 2.9.You can export the file in excel for report creation.You can use the trial version this will achieve what you are looking for.
    True Last Logon displays the following Active Directory information:
    --Users real name and logon name
    --Detailed account status
    --Last Logon Date & Time
    --Last Logon Timestamp (Replicated value)
    --Account Expiry Date & Time
    --Enabled or Disabled Account
    --Locked Accounts
    --Password Expires
    --Password Last Set Date & Time
    --Logon Count
    --Bad Password Count
    --Expiry Date
    --You can also query for any other attribute (Example: Description, telephone Number, custom attibutes etc)
    Refer the below link for trial version:
    http://www.dovestones.com/products/True_Last_Logon.asp
    Best Regards,
    Sandesh Dubey.
    MCSE|MCSA:Messaging|MCTS|MCITP:Enterprise Adminitrator |
    My Blog
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to get list name through javascript?

    Hi,
    I wrote javascript for getting list items but here I'm hard coded list name as "Projects"(my list name). How can I get list name automatically with out hard coding,
    Appreciate if anyone help.
    Thank you.
    function DoLogicalDelete()
    var clientContext = null;
    var oList = null;
    var oListItem = null;
    // var lstItmIsDeleted = null;
    var itmID = getQuerystring('ID');
    clientContext = SP.ClientContext.get_current();
    oList = clientContext.get_web().get_lists().getByTitle('Projects');
    // var oListItemID = SP.ListOperation.Selection.getSelectedItems(clientContext);
    oListItem = oList.getItemById(itmID); // getting ID
    clientContext.load(oListItem,"Title", "IsDeleted"); // load items to oListItem
    oListItem.set_item('IsDeleted', true);
    oListItem.update();
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded),Function.createDelegate(this, this.onQueryFailed));

    Not sure on which context you are executing the code. If you executing this from the list form and trying to get the current list, then you may need to get the list name from the breadcrumb/list title field. Refer to the following posts for more information
    http://sharepoint.stackexchange.com/questions/39008/how-to-get-list-name-from-js-object-model-list-name-from-url-problem
    http://itrob.be/sharepoint-get-all-lists-names-in-javascript-spservice-and-jquery/
    --Cheers

  • In contacts- can I get my contacts to list by compnay name instead of individual names

    Need some help with contacts
    Swinging over contacts from Outlook...
    Can the contacts be listed by company name instead of first or last name?

    As explained here, have your friend turn off Find My iPhone (iPad).
    http://support.apple.com/kb/HT5818
    Hand her the iPad so she can do that.
    Then do Settings > General > Reset > Erase all content and settings and start over with a brand new iPad (as if it just came out of the box).

Maybe you are looking for

  • HT1277 how to set up my email to print automatically

    I have an online menu where my clients can order online and I only have 45min for delivery. I need my incoming email orders to print automatically on my kitchen printer. How can I set up the rule in my email to do that? Thanks, AE

  • Error while saving Type of Task in POSDM

    Hi Frnds,   In PIPE IMG , Under one step processing --> task  , and for the Profile type 0001 , and Task Code 001 ( Supply BW Immediately, Non-Aggr., w. Distribution)    am  changing the " Type of Task " from    "No processing " to " Immediate proces

  • My mini won't shut down

    when i try to shut down my mini, it keeps running. it gets to the point of logging out and i can see just the plain desktop picture. the fan is going, the monitor is on. it won't actually turn off. i've waited for 30 minutes. finally, i'll just unplu

  • Primusrun crashes the system on exit

    Hi there im using bumblebee on my laptop for the optimus support. When i run any graphical application through bumblcee it crashes the whole system when i exit it. for example: $primusrun glxgears It works and diplays it, but when i press ESC to exit

  • CBO and caching effect

    select * from v$version; BANNER Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production CORE    11.2.0.2.0      Production TNS for Linux: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.