This discussion is archived
4 Replies Latest reply: Nov 26, 2012 2:32 AM by Jaap Spiering RSS

Where should we store RIDC connection info?

bglazyr Newbie
Currently Being Moderated
Hello!
We are developing Custom WebCenter Portal application using JDeveloper 11.1.1.5.
We are using RIDC API to connect to UCM and read/write some data in our own taskflows.
We are using 1 account to connect to UCM.
My question: where should we store UCM connection info and how we should access it in our application?
Currently our code looks like code from RIDC sample:
====
_manager = new IdcClientManager();
idcClient = manager.createClient("idc://ucm_host:4444");
userContext = new IdcContext("ucmuser_account", "ucm_user_password");
DataBinder binder = _idcClient.createBinder();
...
ServiceResponse idcResponse = _idcClient.sendRequest(_userContext, binder);
...
====
That is defenitly not right.
I figured out , that we can create Application resource in JDeveloper with RIDC connection details to UCM.
But I have no ideas how to access this details in java code to pass it to RIDC function _manager.createClient and IdcContext constructor.
Thank you in advance.
Best regards,
Boris
  • 1. Re: Where should we store RIDC connection info?
    jiri.machotka Guru
    Currently Being Moderated
    Boris,

    you are right. It is quite difficult to find any info. What I could find is this:

    - how to create a connection is described here: http://docs.oracle.com/cd/E21764_01/webcenter.1111/e10148/jpsdg_content.htm#BABCCFJH
    - as soon as you create a connection, you can add it to your project (I believe it should resolve deployment)
    - for spaces, there are few settings in Enterprise Manager (doing the same?)

    - what I could not find anywhere is how to use the created connection in your code. I understand you don't want to have it hardcoded.
  • 2. Re: Where should we store RIDC connection info?
    bglazyr Newbie
    Currently Being Moderated
    Hello!
    Thank you for reply!
    - how to create a connection is described here: http://docs.oracle.com/cd/E21764_01/webcenter.1111/e10148/jpsdg_content.htm#BABCCFJH
    As I wrote before
    I figured out , that we can create Application resource in JDeveloper with RIDC connection details to UCM.
    Details how to do it is written in your link. But we already created it use for standard taskflows developed by Oracle.
    But I have no ideas how to use it in our own taskflows that we developed by our own. We have to get connection details in our java code to pass it to RIDC function _manager.createClient and IdcContext constructor.
    - what I could not find anywhere is how to use the created connection in your code.
    That is our problem.
    I understand you don't want to have it hardcoded.
    Yes.
    Ok, if we can’t access connector details, may be there is any other secure place to store connection details?
    Best regards,
    Boris
  • 3. Re: Where should we store RIDC connection info?
    Snowy Newbie
    Currently Being Moderated
    This is the best practice:

    ...
    import oracle.stellent.ridc.IdcClient;
    import oracle.stellent.ridc.IdcContext;
    import oracle.webcenter.doclib.internal.config.DocLibADFConfigUtils;
    ...
    String connectionName = DocLibADFConfigUtils.getPrimaryConnectionName();
    IdcClient idcClient = StellentUtils.getIdcClient(connectionName);
    IdcContext idcContext = StellentUtils.getDefaultIdcContext(connectionName);
    ...
  • 4. Re: Where should we store RIDC connection info?
    Jaap Spiering Explorer
    Currently Being Moderated
    I use a similar solution, but still.. DocLibADFConfigUtils is an internal class - There should be a way to achieve this without using internal classes, shouldn't it?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points