Using IClusterInformation Interface to get the server node.

Hi ,
   I have created a portal application which contains an Abstract Portal Component to display the server node the user logs on.
I have written the following code :
IClusterInformation clusterContext =
(IClusterInformation) PortalRuntime.getRuntimeResources().getService( IClusterInformation.KEY);
I too added the Sharing Reference , "com.sap.portal.runtime.system.clusterinformation" to Application Config property in Portalapp.xml file.
But still am getting an error "IClusterInformation cannot be resolved".
Do I need to add some external JAR File to the Java Build Path of my portal Application. If so , Which JAR file I need to add?
Regards,
Eben Joyson.

I use this to get the server - node:
String node = "";
Enumeration props = System.getProperties().keys();
while (props.hasMoreElements()) {
  String thisProp = props.nextElement().toString();
  if (thisProp.startsWith("dsr.") && thisProp.endsWith(".buffersize")) {
    node = thisProp.substring(5 + thisProp.indexOf("_" + SID + "_"), thisProp.indexOf(".buffersize"));
      if (node != null) {
        String cluster = node.substring(0, 6) + "00";
        node = node.substring(0, 8);
Hope it helps
Johannes

Similar Messages

  • Triggering a BPM(NW) using sync interface and get the sync response

    Hi Folks,
    I have a scenario where in I have to trigger a BPM (NW) using a sync interface from a SOAP client by making request to get the response from SAP webservice . If the response from SAP is successful then its a happy path but if it fails or times out then there is an failure mapping to ECC using an IDOC. My question is to achieve the sync process how many synchronous interfaces do I need to use? Please let me know if my design works with 4 sync interface. One outbound sync interface at the source (i.e the request ing system), the other inbound sync interface to the BPM to trigger the BPM, another outbound sync interface within BPM for the request to SAP. the fourth inbound sync interface at the ECC for the response from ECC. Or please let me know if there is a better design option than this.
    Regards
    Kalyan.

    Hi,
    Control Step
    Use
    You use a control step () to do the following:
    ·        Terminate the current process
    ·        Trigger an exception
    ·        Trigger an alert for Alert Management (see also: Triggering an Alert)
    Activities
    Terminate the Current Process
    Choose Terminate Process.
    At runtime, the system terminates the current process instance, including all active steps, and sets the status for the process to logically deleted.
    Trigger an Exception
    Choose Trigger Exception and specify the triggering exception (see also: Exception Handling). The relevant exception handler must be defined in the same block or a superordinate block.
    The system triggers the specified exception at runtime.
    For more information about using exceptions, see Example: Collecting and Bundling Messages - One Interface.
    Proxy..
    How to create proxy.
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/frameset.htm
    How to Activate Proxy.
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    ABAP Server Proxies (Inbound Proxy)
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    OutBound Proxy (Client Proxy)
    /people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    File to R/3 via ABAP Proxy with good example
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    Debug your inbound ABAP Proxy implementation
    /people/stefan.grube/blog/2006/07/28/xi-debug-your-inbound-abap-proxy-implementation
    Thanks,
    Satya Kumar

  • How to get the Change node in Production Server!!!!!

    Hi Guys,
    Kindly let me know how to get the Change node in Production Server for the Transaction Code Pe03 for generating the Acknowledgement No for the year 2008 .
    Plz provide me the steps how to get the Change Node for Acknowledgement No so tat i can get the configuration done.
    Regards
    Ansuman Mohanty.

    Hi Mr!
    If you want to generate the e-file feature 40ACK, do it in our Customization client box (Golden box) & save the request & move to Quality & production.
    Still if you need to workout only in Production, than with the help of Basis people you can get the Production change mode for 5 to 10 min time & can generate it. But mostly Basis people wont give us change mode for Production box ... with ur request they can do..try it.
    Did u collected 4 quarter TAN no's for 2008 Quarter...if not collect it & generate it at a time.
    All the best:-)
    Kind Regards,
    Saisree.S

  • Using the FilenameFilter interface to get the extension of a file

    Hello...
    I am trying to write a java program which is going to parse multiple xml documents and load them into the db. In a directory, there could be files other than xml files. Hence, i want to parse only files which have an .xml extension. I am using the FilenameFilter interface to get the extension of the files in a particular directory. However i am getting confused with the way it shd work...i am attaching herewith the code ...pl help me. I would appreciate if u could send me some sample code.
    /* Author : Jayashree */
    import com.xhive.XhiveDriverFactory;
    import com.xhive.error.XhiveException;
    import com.xhive.core.interfaces.XhiveTransactionIf;
    import com.xhive.dom.interfaces.XhiveDocumentIf;
    import com.xhive.core.interfaces.XhiveDatabaseIf;
    import com.xhive.core.interfaces.XhiveConnectionIf;
    import com.xhive.dom.interfaces.XhiveLibraryIf;
    import org.w3c.dom.Document;
    import java.io.*;
    public class MultiXML
    public static void main(String args[])
    try
    String administratorName = "Administrator";
    String administratorPassword = "secret";
    String DBName = "FirstDB";
    XhiveConnectionIf fConnection = XhiveDriverFactory.getDriver().getConnection();
    System.out.println("Got the connection");
    fConnection.connect(administratorName,administratorPassword,DBName);
    System.out.println("Connected");
    XhiveTransactionIf fTrans = fConnection.createTransaction();
    System.out.println("Transaction");
    fTrans.begin();
    System.out.println("Transaction begun");
    XhiveDatabaseIf fDBase = fTrans.getDatabase();
    String DBName1 = fDBase.getName();
    System.out.println(DBName1);
    XhiveLibraryIf rootLibrary = fDBase.getRoot();
    System.out.println("Got the root");
    File fDir = new File("e:/xhive");
    File[] files = fDir.listFiles(new FileFilter("xml"));
    int i = 0;
    while ((i < files.length))
    Document fDoc = null;
    System.out.println("Document Initialized");
    try
    fDoc = rootLibrary.parseDocument(new File(files[i]+".xml").toURL(), XhiveLibraryIf.PARSER_NO_VALIDATION);
    rootLibrary.appendChild(fDoc);
    System.out.println("Appended");
    catch (Exception e)
    e.printStackTrace();
    i++;
    fTrans.commit();
    System.out.println("Committed");
    fTrans.terminate();
    System.out.println("Terminated");
    fConnection.close();
    System.out.println("Connection Closed");
    catch(Exception e)
    System.out.println(e.getMessage());
    In the above code, I am trying to list all those files which have the filter as .xml. I am unable to understand what code i need to write in the accept method of the FilenameFilter interface which accepts the directory name and the file name. There could be a directory which consists of multiple xml files too..this is where i am finding a problem
    Regards,
    Jayashree

    This sample code uses an inner anonymous FilenameFilter that takes all readable files with a ".xml" extension.
    File[] fileList = dir.listFiles (new FilenameFilter () {
        public boolean accept (File dir, String name) {
            if (!name.trim().endsWith (".xml"))
                return false;
            File f = new File (dir, name);
            if (!f.isFile())
                return false;
            if (!f.canRead())
                return false;
            return true;
    });Please post any question if you don't understand.
    Matthieu

  • Getting current server node url.

    Hi,
    I have a requirement where i need to refresh the whole browser.
    1. We have three boxes DEV,ACC,PROD all having different url.
    can u pls let me know hoe to get the current server node url in a Dynpage application.
    What methods can I use for this.

    Hi,
    If you nodes are in cluster you get information from similarly as below:
    import com.sapportals.portal.prt.service.clusterinformation.IClusterInformation;
    public static int getCurrentNodeId() throws PortalRuntimeException
              //     Get the current Node
              final IClusterInformation clusterInfo = (IClusterInformation)PortalRuntime.getRuntimeResources().getService(IClusterInformation.KEY);
              return(clusterInfo.getNodeId());
    public static String getServerName()
              String name = null;
              try
                   InetAddress host = InetAddress.getLocalHost();
                   name = host.getHostName();
              }catch(UnknownHostException hostExcept)
                   LogHelper log = GlobalConfig.getServiceLog();
                   log.log("Error looking up server name: ", hostExcept);
              return(name);
    Hope this will help you.

  • How to get the selected node value of a tree which is build on java code

    Hi Experts,
    How can i get the selected node value if I build the tree programatically.
    I am using the following code in selectionListener but it is throwing error.
    RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
    CollectionModel _tableModel =
    (CollectionModel)treeTable.getValue();
    RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
    Iterator rksIterator = _selectedRowData.iterator();
    String selectedQaCode ="";
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding =
    treeTableBinding.findNodeByKeyPath(key);
    String nodeStuctureDefname =
    nodeBinding.getHierTypeBinding().getStructureDefName();
    selectedQaCode = selectedQaCode + nodeBinding.getAttribute(0);
    where I am using following link to create a tree with java code.
    http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html
    Please help me in resolving this issue.
    Regards
    Gayaz

    Hi,
    you should also move
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    out of the while loop as this is not necessary to be repeated for each key in the set
    Frank

  • Is there any way to get the server app other that through the app store. We do not have our system conneted to a network. I typical downloaded items on a non-apple system.

    is there any way to get the server app other than through the app store. The system that I need it on are not connected to the internet.
    We run a closed-loop network of apple systems and I tipically downloaded updates on a non-apple system that was on the internet.
    Any ideas?

    I did buy the server app, went to the app store to download it. This system I'm using for downloads is Snow Leopard 10.6.8, it shows that I can download it but only as an Install which says I need 10.8. I can't seem to find a way for it to just download as a package or .dmg file so that I can copy it to DVD/CD or flash drive.

  • How to get the current node element by its value?

    e.g,:
    wdContext.current<b>Deal</b>Element().setAttributeValue("<i>deal_id</i>","<i>aaaaaaa</i>");
    above code can get the result i wanna.
    but now i wanna in terms of its node'name to  set attribute vaue of itself. in other words,i have no idea about how to get the current node element by its name"<b>Deal</b>".

    Hi Wing,
    The answer is there in your question itself.
    wdContext.currentDealElement()
    will give you the current node element by its name"Deal" or you could use
    wdContext.nodeDeal().getCurrentElement()
    or you could use
    wdContext.nodeDeal().getElementAt(wdContext.nodeDeal().getLeadSelection())
    Regards,
    Sudeep

  • Not getting the server pool in the list of server pool

    We are facing following issue. Can you please help on this. Or how can we get help on this. I would be thankful for this.
    We have created a server pool which consists of two vm servers. Two vm servers we created manually.
    We are using following steps to create third virtual server.
    1. Click "next" on "create virtual machine" screen.
    2. Click "next" on "installation media" screen
    3. It asks to select a server pool from the list but we are not getting the server pool in the list of server pool which we created earlier.
    We did this exercise before and we got the server pool name in the list which allowed us to create virtual machine. Now when we reinstalled the vm servers machine and also vm manager, we are not able to do this once again.

    Hi,
    please check the status in Server Pools ( it need to be in Active). then check in the Servers the status need to be in active in VM Manager.

  • How to get the Server Name in Crystal

    Hi All,
    We created a Crystal Report that pulls images from a File Location at the run time and this File Location is different for each environment (D-Q-P). We are trying to automate the file location by the server name. Is there any function in Crystal Reports that we can get the server name so we know if it is D-Q or P system?
    Thank you,

    Hi,
    There is no function in CR that can fetch the Server Name. That is something you need to provide to the formula.
    If you're loading images from a location on the Server, you can always use a Relative Path. For eg: if the images would be stored in a folder called Images, then you can write a formula on the 'Graphic Location' for the OLE object as:
    "/Images/Crystal.jpg"
    This will load the image from the folder when it is run on D, Q or P.
    Hope this helps!
    -Abhilash

  • Error getting the server-side naming service functionality

    Hi all,
    we are currently setting up the CTS+ activity based transport scenario. Everything seems to be working fine, however, we have to import each transport twice...
    Before I go into detail in the error we get I will first describe our landscape. All the configuration we did was done in debate with SAP.
    We use the SAP Solution manager (ehp1 SP 4) as the CTS+ server as recommended by SAP and have an NWDI system of which we only use the components DTR and CBS (since CMS is not used anymore in the activity based transport). We have defined three logical ports/RFCs. CTSCONFIG points to the NWDI system. CTSDEPLOY is running on the java stack of the solution manager and is only used for portal content (=epa) transports. CTSDEPLOY_DI is pointing to the NWDI system and is used for all NWDI (=dip) changes. The NWDI is running ehp1 SP3.
    In STMS I defined all the non-abap systems (and configured them to use CTSDEPLOY_DI) and created the following transport route:
    upload system (IMP) -> DEV -> ACC -> QAS -> PRD
    I first attached the used dependencies in a transport request (SAP_BUILDT, EP_BUILDT, etc) these imported just fine. Then I did the SCA files which contain our custom code. I extracted these from the assemble step on our current NWDI system which will be removed as soon as we switch to the new CTS+ environment.
    When we import the transport into the runtime systems then we see the DTR and CBS be filled sucesfully for this specific system. However, the transport request itself always fails with errorcode 12 and the error is:
    Error during export service registration: Error getting the server-side naming service functionality during getInitialContext opera
    tion. com.sap.engine.services.jndi.persistent.exceptions.NamingException: Error getting the server-side naming service functionality during getInitialContext operation.
    Error in execution of Web services CTSDEPLOY_DI , exception is cx_cts_file_import_failed
    File import canceled
    When we then reimport the same transport it will go the second time fine. This is no problem during the setup but will not be workable when we go live ofcourse. Is there anyone who had this issue before as well and have a solution for it?
    Kind Regards,
    Nico van der Linden...

    Hello Nico,
    I would need the java trace files to get more info on this issue, but you can start troubleshooting this error with these notes:
    #1172252: CTS+, 'attach file': Troubleshooting Guide;
    #1003674: Enhancement for non-ABAP systems in CTS;
    #1155884: CTS+, configuration 'close coupling': Troubleshooting guide;
    Pay special attention to parameter  NON_ABAP_WBO_CLIENT, whether it's correctly set on your CTS+ system(s).
    Note #1003674 is a must for any CTS+ systems to work properly, as well as having an updated version of the transport programs (tp and R3trans).
    Lastly, note #1155884 goes through some JCoException exceptions that commonly take place during CTS+ transports. But again, you need to check the underlying trace files to find the root cause of your issue.
    I hope this information helps.
    Best regards,
    Tomas Black

  • How to get the leaf node in a hierachy????

    if i get a record that a parent node in a hierachy table ,so how can i get the leaf node of this parent node quicklly?????thank you!

    Hi xuhuanjun ,
    Refer to the below threads which disucss the same.
    Re: how to ensure a hierarchy tree's node is a internal leaf???????
    Re: Retrieve Hierarchy Leaf Node using API.
    Hope it helps.
    Thanks,
    Minaz

  • Exception while getting the server instance. Stateless bean problem

    Hi,
    New to OC4J, I'm moving an ear that was running ok under jboss.
    1- The wep app deploys. This is a piece of code inside the init() method of a struts plugin:
         System.out.println("0");
         AddressFacadeHome addressFacadeHome = HomeFactory.getAddressFacadeHome();
         System.out.println("1.0");
         AddressFacade addressFacade = addressFacadeHome.create();
         System.out.println("1.5");
    2- The code is run when the web app is initialized. This is the error message I get. system.out show that the error occurs on addressFacadeHome.create().
    AddressFacade is a remote/local stateless bean. HomeFactory returns the jndi lookup/narrow of the remote object.
    0
    1.0
    caught exception while getting the server instance null
    java.lang.NullPointerException
    com.evermind.security.User com.evermind.server.ThreadState.getCurrentUser()
    ThreadState.java:637
    com.evermind.security.User com.evermind.server.ThreadState.getUser()
    ThreadState.java:371
    fda.common.address.ejb.interfaces.AddressFacade AddressFacadeHome_StatelessSessionHomeWrapper7.create(
    AddressFacadeHome_StatelessSessionHomeWrapper7.java:66
    void fda.web.oaa.struts.plugin.ApplicationInit.init(org.apache.struts.action.ActionServlet, org.apache
    .struts.config.ModuleConfig)
    void org.apache.struts.action.ActionServlet.initModulePlugIns(org.apache.struts.config.ModuleConfig)
    ActionServlet.java:1105
    void org.apache.struts.action.ActionServlet.init()
    ActionServlet.java:468
    void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig)
    GenericServlet.java:258
    com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.loadServlet(com.
    evermind.util.ByteString)
    HttpApplication.java:1956
    com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.findServlet(com.
    evermind.util.ByteString)
    HttpApplication.java:4355
    void com.evermind.server.http.HttpApplication.initPreloadServlets()
    HttpApplication.java:4455
    void com.evermind.server.http.HttpApplication.initDynamic(com.evermind.server.http.HttpApplicationConf
    ig)
    HttpApplication.java:662
    void com.evermind.server.http.HttpApplication.<init>(com.evermind.server.Application, com.evermind.ser
    ver.http.HttpSite, com.evermind.server.http.HttpApplicationConfig, java.lang.String, java.lang.String, boolean
    My guess is that it's a jaas issue (because i see security and getCurrentUser), but at init time, no user is authenticated.
    Any clue would be very much appreciated. Let me know if I can provide anything else, such as deployment descriptors.
    Thanks,
    Christophe.

    After spending some time on this, I looked at the source code for com.evermind.server.ThreadState
    This is the code that throws the exception:
    if(applicationThread != null && applicationThread.httpHandler != null && applicationThread.servletInfo != null)
    try
    server = applicationThread.httpHandler.request.getApplication().getApplication().getServer();
    catch(Throwable t)
    System.out.println("caught exception while getting the server instance " + t.getMessage());
    t.printStackTrace(System.out);
    It looks like this method expects a httpRequest, and would find null because I'm in the servlet.init()
    (at least, that's my interpretation)
    I tested my code (the remoteFacade.create()) inside of a jsp, and it worked...
    So, the next logical question is:
    Can I make EJB calls from within the init method of a servlet? (or more specifically from a struts plugin, which I believe should be more or less the same thing)
    If so, do I need to take extra steps?
    Again, any experience/help on this will be much appreciated.
    Thanks,
    Christophe.

  • How to get the server port and id from the Initialcontext

    hi
    i know that i can get the server port and id where the jndi service is listening from the InitialContext ( when i create InitialContext ic = new InitialContext(); from within a EJB. ). Does this work on any application server and where (at what position is for example the port) in the Enumeration at the ic are the different things put?

    I would usually just get the PROVIDER_URL property from the InitialContext and use that to determine the location of the naming service:
    String providerURL = (String)ic.getEnvironment().get(Context.PROVIDER_URL);You'll then need to parse that string to obtain the port and the server name. For example:
    // Assume that the provider URL is of form "protocol://server:port"
    int serverStartIndex = providerURL.indexOf("://" + 3);
    int serverEndIndex = providerURL.indexOf(:, serverStartIndex);
    String server = providerURL.substring(serverStartIndex, serverEndIndex);
    String port = providerURL.substring(serverEndIndex + 1);It's a fairly universal approach but there'll doubtlessly be some special cases (for example, the provider URL could be null and the InitialContextFactory class defaults it).
    You might have to adjust the server/port parsing stuff a bit as I just made that up and your URL might not conform to the pattern I described.
    Hope this helps.

  • Is there inbuild Handler in weblogic using which i can get the MessageContext object

    HI,
    I need MessageContext object in my application but i dont want to use the Handler,As
    there is AxisEngine in axis soap engine,is there any similar implementation in
    weblogic.
    AxisEngine.getCurrentMessageContext() we can get the MessageContext what about
    in weblogic..any body any idea???
    Regards,
    Akhil Nagpal

    HI,
    yeah i had to make use of Handler to get the MessageContext object and play with
    that.
    Thanks & Regards
    Akhil Nagpal
    "manoj cheenath" <[email protected]> wrote:
    You can get to MessageContext from a handler. Check out an example of
    handler
    to see how you can get Message out of MessageContext.
    -manoj
    "Akhil Nagpal" <[email protected]> wrote in message
    news:[email protected]..
    HI manoj,
    Thanks for your reply.otherwise i thought that i wont get any morehelp
    on this
    forum :-) ...
    anyway its good that we will have such thing in next version,duringthe
    development
    i feel that more functioanlity should be in build in appserver. Likeone
    more
    thing i could not find out is how we can get the "message" object inweblogic
    like we can in axis using its MessageContext class's static method.if it
    is there
    can you please let me knwo about that.
    The other problem i had to make use of handler and my appl is workingas of
    now :-)
    Regards
    Akhil Nagpal
    "manoj cheenath" <[email protected]> wrote:
    You can not do this in WLS 7.0. The next major release (WLS 8.1) will
    fix
    this problem.
    -manoj
    "Akhil Nagpal" <[email protected]> wrote in message
    news:[email protected]..
    HI,
    I need MessageContext object in my application but i dont want
    to
    use
    the Handler,As
    there is AxisEngine in axis soap engine,is there any similarimplementation in
    weblogic.
    AxisEngine.getCurrentMessageContext() we can get the MessageContextwhat
    about
    in weblogic..any body any idea???
    Regards,
    Akhil Nagpal

Maybe you are looking for

  • HT201412 My iPad 1 crashes every time I open a game app, and for some sites and blogs such as Facebook or Awesomer. What's wrong with it?

    Hi, my iPad 1 can barely open a game for more than a couple of minutes without crashing and going back to the home screen. I've had it for about 2 years but it has been happening for about a year, and now it's annoying me more than ever. It happens o

  • Funny printing problem

    I have a strange printing problem. I have set up airport extreme downstairs - for my laptop - and a relay (airport express) to reach upstairs (long way) for my wife's laptop. My wife's laptop (upstairs using the relay) will only print remotely if my

  • Acknowledgements

    In the HOW TO HANDLE IDoc ACKNOWLEDGMENTS doc do i do this configuration in my XI box or my receiving ECC box?

  • ASMCMD

    Hi , I have datafiles and archivelogs in asm diskgroups,and we configured standby also.So we are taking backup through RMAN.In asmcmd there is no COPY command. If i get any problem in redo apply services on standby, the logs will not be applied autom

  • Opening Captivate 5.5

    We are experiencing trouble opening Captivate.  We have it installed on multiple computers and it will not open.  We do have captivate installed on one computer that seems to be working.  We have tried uninstalling and re-installing, hoping that woul