Transaction Management - OIM API

We wanted to know how to handle transaction from OIMClient, when we make OIM API call.
eg:
from a java client, we invoke create organization and provision resource to that organization.
i.e we end up calling two OIM api calls
1)
    organizationManager.create(organizationObj);
2)
tcOrganizationOperationsIntf.provisionObject(orgKey,resourceKey);
Now, if 2nd one fails, then transaction should be rolled back and organization create should be rolled back. we wanted single unit of work to be achieved.
how can this be achieved?
how do we control transaction from OIMClient/API?
public String createOrganization(OrganizationVO ovo) {
  String result = "";
  OrganizationManager omgr = null; // OIMClient API
  Organization org = null; // OIMClient API
  try { 
  omgr=ULMServiceLocator.getInstance().getOrganizationManager();
  org = new Organization();
  org.setAttribute("Organization Name", ovo.getOrgName());
  org.setAttribute("Organization Customer Type", ovo.getOrgType());
  result = omgr.create(org);
  tcUtilityFactory ioutilityFactory = ULMServiceLocator.getInstance().getcUtilityFactory();
  //TODO
  tcOrganizationOperationsIntf utilityFactory1 = (tcOrganizationOperationsIntf) ioutilityFactory
  .getUtility("Thor.API.Operations.tcOrganizationOperationsIntf");
  long l1 = utilityFactory1.provisionObject(Long.parseLong(result),
  123l);
  } catch (oracle.jrf.UnknownPlatformException e) {
  e.printStackTrace();
  } catch (Exception e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
  return result;

Hi Abhay,
<b>If there is another way to add a record to Main table and Lookup/Qualified/Hierarchy table simultaneously then there is no need of Transaction.</b>
There are no direct methods currently(as of MDM 5.5SP3) available in MDM API.
You have to build your own logic to implement.
Regarding the Transaction management, I guess you are talking aboout two phase commit scenarios. I would say you can achieve this using EJB's in which u write the business logic (In this case the MDM API code).
For Example:
Adding a record to Main table,
Let say 2 fields
1. Free text field.
Its straight forward method, use A2iFiled object and assign some value to it.
2. Lookup field.
For this.
First get the Record id for the value, which you are trying to add, from the lookup table.
If the lookup table does not find the value in the table, it return zero or some negative value(which I am not sure).
Based on the return value you can add the value into the lookup table and then into the main table.
Just putting a sample scenario. Hope this helps.
Thanks and regards
Subbu

Similar Messages

  • Error in oim Role creation using Role Manager Service API from Standalone Java client

    Hi,
      Facing the following error when trying to create Role using Role Manager Service API from a standalone java client .
    Tried with the solution of changing ,
    Login into the Web Logic Admin Console --> Servers --> OIM Server --> Protocols --> Modify the Maximum Message from 100000000 to 1000000000, but still the problem persists.
    Exception in thread "main" org.omg.CORBA.BAD_PARAM:   vmcid: 0x0  minor code: 0  completed: No
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
    at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
    at com.sun.org.omg.SendingContext._CodeBaseStub.meta(Unknown Source)
    at com.sun.corba.se.impl.encoding.CachedCodeBase.meta(Unknown Source)
    at com.sun.corba.se.impl.io.IIOPInputStream.getOrderedDescriptions(Unknown Source)
    at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectUsingFVD(Unknown Source)
    at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(Unknown Source)
    at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(Unknown Source)
    at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(Unknown Source)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(Unknown Source)
    at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(Unknown Source)
    at oracle.iam.identity.rolemgmt.api._RoleManager_ogut7n_RoleManagerRemoteRIntf_Stub.createx(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    at $Proxy2.createx(Unknown Source)
    at oracle.iam.identity.rolemgmt.api.RoleManagerDelegate.create(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
    at weblogic.security.subject.SubjectProxy.doAs(SubjectProxy.java:64)
    at weblogic.security.subject.SubjectManager.runAs(SubjectManager.java:262)
    at weblogic.security.Security.runAs(Security.java:48)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
    at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
    at $Proxy3.create(Unknown Source)
    at com.idm.role.CreateRole.createRole(CreateRole.java:113)
    at com.idm.role.CreateRole.main(CreateRole.java:167)
    Thanks In Advance

    Hi , I have used OIM 11g  R2.
    Please find below the code we have used,
    package com.idm.role;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.Hashtable;
    import java.util.Iterator;
    import java.util.Set;
    import java.util.logging.Logger;
    import javax.security.auth.login.LoginException;
    import oracle.iam.identity.exception.NoSuchRoleException;
    import oracle.iam.identity.exception.RoleAlreadyExistsException;
    import oracle.iam.identity.exception.RoleCreateException;
    import oracle.iam.identity.exception.RoleLookupException;
    import oracle.iam.identity.exception.RoleModifyException;
    import oracle.iam.identity.exception.SearchKeyNotUniqueException;
    import oracle.iam.identity.exception.ValidationFailedException;
    import oracle.iam.identity.rolemgmt.api.RoleManager;
    import oracle.iam.identity.rolemgmt.api.RoleManagerConstants;
    import oracle.iam.identity.rolemgmt.vo.Role;
    import oracle.iam.platform.OIMClient;
    import oracle.iam.platform.authz.exception.AccessDeniedException;
    public class CreateRole {
    private final static Logger LOGGER = Logger.getLogger(CreateRole.class .getName());
    OIMClient oimClient = null;
    public OIMClient connectToOIM() {
      LOGGER.info("In connectToOIM ");
      Hashtable env = new Hashtable();
      env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL,
        "weblogic.jndi.WLInitialContextFactory");
      env.put(OIMClient.JAVA_NAMING_PROVIDER_URL,
        "t3://V-hydidm1.itig.co.in:14000");
      System.setProperty("java.security.auth.login.config",
        "F:\\Projects\\IDM\\Team\\Env_setup\\OIM_Setup\\designconsole\\config\\authwl.conf");
      System.setProperty("java.security.policy",
        "F:\\Projects\\IDM\\Team\\Env_setup\\OIM_Setup\\designconsole\\config\\xl.policy");
      System.setProperty("OIM.AppServerType", "wls");
      System.setProperty("APPSERVER_TYPE", "wls");
      System.setProperty("weblogic.Name", "oim_server1");
      oimClient = new OIMClient(env);
      try {
       oimClient.login("xelsysadm", "Passw0rd".toCharArray());
      } catch (LoginException e) {
       e.printStackTrace();
      System.out.println("Connected");
      return oimClient;
    public void readRoleMetadata() {
      LOGGER.info("in readRoleMetadata ");
      RoleManager roleManagerService = oimClient
        .getService(RoleManager.class);
      try {
       Role roleVo = roleManagerService.getDetails(
         RoleManagerConstants.ROLE_DISPLAY_NAME, "API Role1", null);
       Set attributeNameSet = roleVo.getAttributeNames();
       Iterator it = attributeNameSet.iterator();
       while (it.hasNext()) {
        System.out.println("Attribute Name :: " + it.next());
       // roleVo.setAttribute("ADentitlements", "Security Admin access");
       String adEntitlements = "" + roleVo.getAttribute("ADentitlements");
       System.out.println("AD Entitlements :: " + adEntitlements);
       System.out.println("DB Entitlements :: " + ""
         + roleVo.getAttribute("DBEntitlements"));
       System.out.println("Unix Entitlements :: " + ""
         + roleVo.getAttribute("UnixWindows"));
       System.out.println("VPN :: " + "" + roleVo.getAttribute("VPN"));
      } catch (SearchKeyNotUniqueException e) {
       e.printStackTrace();
      } catch (NoSuchRoleException e) {
       e.printStackTrace();
      } catch (RoleLookupException e) {
       e.printStackTrace();
      } catch (AccessDeniedException e) {
       e.printStackTrace();
    public void createRole() {
      LOGGER.info(" in Create role ");
      RoleManager roleManagerService = oimClient
        .getService(RoleManager.class);
      HashMap<String, Object> roleCreationAttrMap = new HashMap<String, Object>();
      roleCreationAttrMap.put(RoleManagerConstants.ROLE_NAME, "API Role1");
      roleCreationAttrMap.put(RoleManagerConstants.ROLE_DESCRIPTION,
        "This Role is created using API Role1");
      roleCreationAttrMap.put(RoleManagerConstants.ROLE_DISPLAY_NAME,
        "API Role1");
      roleCreationAttrMap.put("ADentitlements", "API Role1 AD Entitlements");
      roleCreationAttrMap.put("DBEntitlements", "API Role1 DB Entitlements");
      roleCreationAttrMap.put("VPN", "No");
      roleCreationAttrMap.put("UnixWindows", "API Role1 Unix Entitlements");
      Role roleVo = new Role(roleCreationAttrMap);
      try {
       System.out.println(" Before Create role *********************************************");
       roleManagerService.create(roleVo);
       System.out.println("Role Created .. ");
      } catch (ValidationFailedException e) {
       e.printStackTrace();
      } catch (RoleAlreadyExistsException e) {
       e.printStackTrace();
      } catch (RoleCreateException e) {
       e.printStackTrace();
      } catch (AccessDeniedException e) {
       e.printStackTrace();
    public void modifyRole() {
      LOGGER.info(" in modifyRole ");
      RoleManager roleManagerService = oimClient
        .getService(RoleManager.class);
      Role roleVo;
      try {
       roleVo = roleManagerService.getDetails(
         RoleManagerConstants.ROLE_DISPLAY_NAME, "API Role1", null);
       String roleKey = roleVo.getEntityId();
       HashMap<String, Object> roleCreationAttrMap = new HashMap<String, Object>();
       roleCreationAttrMap.put("ADentitlements",
         "Updated API Role1 AD Entitlements");
       Set roleKeySet = new HashSet<String>();
       roleKeySet.add(roleKey);
       Role roleVoNew = new Role(roleCreationAttrMap);
       roleManagerService.modify(roleKeySet, roleVoNew);
       System.out.println("Role Modified ..");
      } catch (SearchKeyNotUniqueException e) {
       e.printStackTrace();
      } catch (NoSuchRoleException e) {
       e.printStackTrace();
      } catch (RoleLookupException e) {
       e.printStackTrace();
      } catch (AccessDeniedException e) {
       e.printStackTrace();
      } catch (ValidationFailedException e) {
       e.printStackTrace();
      } catch (RoleModifyException e) {
       e.printStackTrace();
    public static void main(String args[]) {
      CreateRole miscObj = new CreateRole();
      miscObj.connectToOIM();
      miscObj.createRole();
      //miscObj.readRoleMetadata();
    Thanks In Advance .

  • Manage OIM 11g System Properties via API

    Can someone please help me understand how to use the OIM 11g API to manage OIM System Properties. In the prior version I was able to use the tcPropertyOperationsIntf class, but it looks like this now only supports reading the attributes, but I need the ability to update and delete properties from the API.
    What is the proper API to use to implement this in an EventHandler class that extends tcBaseEvent?
    Thanks!

    Hey,
    Sorry to revive this pretty old thread, but it's still unanswered and I would be interested in having the answer to this question...
    Thanks,
    --jtellier                                                                                                                                                                                                                                                                                                                                       

  • Calling OIM API from a remote system

    Hi.
    I have OIM 9031 server installed on a computer HostA. And I have multiple copies of the 3rd party java program installed on HostB, HostC and so on.
    I need to be able to call some OIM API from that custom java program (for example, receive the list of active users from OIM server).
    According to OIM documentation, I can use Remote manager to manage users on non-network awared systems.
    But what if I use Remote manager for calling remote OIM API ? Is that possible?
    Or are there any easier ways to achieve my goal ?

    The installer in the AD sync connector is provided because in addition to having the OIM API client, there is a DLL that needs to be installed and registered to capture the plaintext password. It is not necessary to have an installer, but it might be be a convenience if you are deploying to many machines.
    Here is some code to get you started:
    import Thor.API.tcUtilityFactory;
    import com.thortech.xl.util.config.ConfigurationClient;
    import java.util.Hashtable;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class TcUtilFactory {
    Log log = LogFactory.getLog("OIMCLIENT.UTILITY");
    private tcUtilityFactory factory = null;
    private Hashtable env = null;
    public TcUtilFactory() throws Exception {
    // you can also set these system properties on the command line
    System.setProperty("XL.HomeDir", "/opt/oimclient);
    System.setProperty("java.security.policy", "config/xl.policy");
    System.setProperty("log4j.configuration", "config/log.properties");
    System.setProperty("java.security.auth.login.config", "config/auth.conf");
    ConfigurationClient.ComplexSetting configClient = ConfigurationClient
    .getComplexSettingByPath("Discovery.CoreServer");
    env = configClient.getAllSettings();
    try {
    factory = new tcUtilityFactory(env, "xlsysadm", "xelsysadm");
    } catch (Exception e) {
    // handle exceptions thrown by tcUtilityFactory constructor
    From here you can write whatever methods you need going against tcUtilityFactory. Also note that you will need many of the jars from your lib directory as well as the properly configured xl.config and other files in the config directory that the design console client uses (I usually just copy them from that install). Last you will need to make sure you have the required jars specific to you app server (the ones you need to copy over during the design console install)

  • BPEL Transaction Management from Client Caller

    Hi Guys,
    I have read many articles and postings so far on transaction management, but they all seem to relate to within the BPEL process itself. I want to know if the following is doable within BPEL and if so how to configure it.
    - I have a J2EE application that integrates with BPEL through the ITaskService (using Remote EJBs underneath the cover) - Oracle BPEL is installed on a separate machine on the OC4J container.
    - So, is there a way for the operations done to the ITaskService to participate in my J2EE application's transaction, to give you an example:
    - Begin Transaction()
    - user does something that results in updating a task's attribute
    - some other operations are being performed; if there is an exception thrown, roll back
    - End Transaction()
    Thanks very much in advance.
    Drew

    Hi Drew,
    Please refer Antony Reynold's blog:
    http://blogs.oracle.com/reynolds/2008/09/transaction_processing_in_bpel.html
    It says when the BPEL Process is invoked from a java API that has its own
    transaction context, the BPEL Process also will participate in the same
    transaction context.
    Hope this helps.
    Thanks,
    Vasanth

  • Disabling resources via OIM API. Which appKey?

    Hi gurus!
    I'm developing my own scheduler tasks that use the OIM API to manage users and their resources. I'm working with OIM version 9.0.3
    One of these tasks has to disable a provisioned resource for an user, by using the tcUserOperationsIntf.enableAppForUser() method. This method has two parameters: the user key and the app key. So, before the invokation, I have to find them.
    I know how to get the user key, but I don't know which object key must I choose between the OBI_KEY, ORC_KEY and OIU_KEY.
    I've tried to do it with obi_key and oiu_key, and sometimes works with obi_key and sometimes with oiu_key. What is the difference between these two keys?
    This is my code:
         tcResultSet users = findUser(userLogin); //this method uses the tcUserOperationsIntf.findUsers() api method
         if (users != null) {
    tcResultSet resources = findResource("resource_name"); // this method uses the tcObjectOperationsIntf.findProvisionableObjects() api method
    long userKey = users.getLongValue("Users.Key");
    long resourceKey = resources.getLongValue("Objects.Key");
         tcResultSet resource = findResourceByUser(userKey, resourceKey, "Objects.Key"); //this method uses the tcUserOperationsIntf.getObjects() api method
    if (resource != null) {
    long obiKey = resource .getLongValue("Object Instance.Key");
    String status = resource .getStringValue("Objects.Object Status.Status");
    long oiuKey = recurso.getLongValue("Users-Object Instance For User.Key");
    if ("Disabled".equals(status)) {
    userUtil.enableAppForUser(userKey, oiuKey); //userUtil is an instance of tcUserOperationsIntf
    Edited by: bucle on 25-nov-2008 4:49

    What these are is roughly explained in the API Usage Guide for Meta Data mapping.
    OBI = Object Instance : There are lots of object instances including users.
    OIU = Object Instance for User : These are the object instances that actually belong to a user, for example a provisioned resource.
    You want the OIU which is returned by the getObjects method as the first value.
    Edited by: user809225 on 25-Nov-2008 14:09

  • Tyrex's Transaction Manager

    I am unable to find any sample code for using Tyrex's Transaction Manager and the JTA API. Can anyone help me here? There are two things I need help with, but if you can help me on any of them that would be huge!
    1. Setting up / Configuring Tyrex
    2. Adding MS SQL as DataSource (and Transaction Domain? It's not clear what that means exactly) (I have the beta JDBC driver from MS)
    I search around google but couldn't get any helpful tutorial about Tyrex and Tyrex's website has next to nothing in help too!
    fatmond

    Not really. This is a forum about Java reflection and your question is not related to that in the least. The JDBC forum is also supposed to include questions about JTA but I doubt you're going to get an answer there either, because of the obscurity of the software you're asking about. But it's worth a try.
    Or you could post on Tyrex's mailing list.

  • Forte Transaction Management & 2PC

    Forte Transaction Management & 2PC
    The main purpose of 2PC in a distributed transaction manager is
    to enable recovery from a failure that occurs during the window
    of transaction commit processing. The Forte transaction manager was built
    with this in mind but only with respect to the "volatile" (or "in memory")
    objects that Forte manages. What this implies is that because Forte stores
    objects in memory and not persistently on disk, the requirement of recovery
    for these objects is significantly reduced (if not eliminated all together).
    Forte follows a distributed 2PC model in that tasks and messages carry
    along with them transaction identification and, during commit processing,
    every distributed participant is polled for its availability to commit
    the transaction. Applications saving persistent data to disk during a
    distributed Forte transaction need to concern themselves with the potential
    for failure during the commit processing window. Forte's prepare phase polls
    each site (confirming a communications link with each distributed participant)
    but no prepare request goes to the database primarily because (in release 1 and
    2 of forte) no database supported a general distributed two-phase commit
    (one could take issue with that in the case of Sybase, but rather than debate
    this point, suffice it to say that the general direction in the industry for
    support of this functionality was through TP monitors -- more on that later).
    Once all sites are ready to commit Forte expects that the commit will
    complete successfully. If at this moment, for example, a participating
    Sybase server terminates (with data not yet committed) while a participating
    Oracle server has already committed its unit of work, then the outcome of
    the distributed transaction is inconsistent - if no one has yet committed
    Forte will still abort the transaction. This "window of inconsistency"
    is documented in the Forte TOOL manual.
    Mission critical applications that require distributed transactions can
    address this window of inconsistency in a number of ways:
    * Utilize a TP monitor such as Encina (see below)
    * Log distributed updates in an auxiliary database table (much like a
    distributed transaction monitor's transaction-state log). This approach has
    been the traditional banking application solution prior to the commercial
    availability of products like Encina, Tuxedo, TopEnd, etc.
    This solution is somewhat complex and is usually not generic enough
    so as not to have to change code every time a new table or database
    site is introduced into the application's data model.
    * Rearrange the data model in order to eliminate the need for distributed
    transactions. This is usually only a temporary solution (with smaller
    numbers of active clients) and cannot be applied to complex legacy systems.
    With the advent of the X/Open distributed transaction architecture (the
    XA Interface) more database vendors have found that by complying with the
    XA interface they can plug their database-specific implementation of
    transaction into a globally managed transaction, with commit and abort
    processing being conducted by a central coordinator. Of course, the
    overall transaction manager coordinating the global transaction must
    itself, persistently record the state of the different distributed
    branches participating in the transaction. A significant portion of
    the functionality provided by products such as Encina, Tuxedo, TopEnd and
    OpenTP1 is to provide exactly this global transaction management.
    Rather than extend the Forte distributed transaction manager with the
    functionality necessary to manage and recover distributed transactions
    that modify data on disk, Forte has chosen to integrate with the emerging
    set of commercial transaction monitors and managers. This decision was
    built into the original design of the Forte transaction model (using XA and
    early Tuxedo white-papers as guidelines):
    * In Forte release 2 an integration with Encina was delivered.
    * In January 1997 a press release announced an integration of
    OpenTP1 with Forte for release 3.
    * The Forte engineering staff is currently investing integration
    with other transaction management products as well.
    Neil Goodman,
    Forte Development.

    You don't. ("manage" a transaction)
    There is nothing really to "manage".
    A transaction is automatically started when you make any changes to data (e.g. fire off a DML statement).
    You simply needs to issue a COMMIT or ROLLBACK when needed. A COMMIT at the end of the business transaction and not before (i.e. no committing every n number of rows). A ROLLBACK when hitting an exception or business logic error that requires the uncommitted changes to be undone.
    That in a nutshell is it. It is that simple.
    Oracle also supports creating savepoints and rolling back only some changes made thus far in the transaction.
    The only other thing to keep in mind that a DDL in Oracle issues an implicit commit. Firing off a DDL with cause any exiting uncommitted transaction to be committed.
    Transaction "logic/management" should not be made more complex than this.

  • Error while Running Receiving Transaction Manager

    Hi.,
    We have 11..5.10.2 on AIX 5.3 intermeditley we are getting the below error for Receiving Transaction Manager. for temporary sloution we will restart the Receiving Transaction Manager is there any permanent solution for this.....?
    we have two Receiving Transaction Manager process.
    Error
    "APP 00204: Concurrent manager encountered an error while running the spawned
    concurrent program Receiving Transaction Manager: rcvoltm TM:Timeout"

    Hello.
    Have a look on MOS Doc ID 1071727.1
    Octavio

  • Enabling a User through OIM API

    Hi I am trying to enable a user through OIM API, However the end date is already passed for that user, I am setting up a new end date through the Program (showm below). However the update user is not working (i am not sure).
    Map usermap = new HashMap();
    usermap.put("Users.User ID", User_id );
    Map grpmap = new HashMap();
    grpmap.put("Groups.Group Name", Group_Name);
    tcResultSet ts = userClient.findUsers(usermap); //find all users
    String existing_end_date = ts.getStringValue("Users.End Date");
    tcResultSet tg = groupClient.findGroups(grpmap); //find requireq group
    long ukey = ts.getLongValue("Users.Key");
    long gkey = tg.getLongValue("Groups.Key"); //find group key
    // ENABLE THE USER
    java.util.Date new_end_date = new java.util.Date(111,1,1);
    Calendar cal = Calendar.getInstance();
    cal.setTime(new_end_date);
    DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    String Str1 = dateFormat.format(cal.getTime());
    String Str2 = existing_end_date + " 12:00:00";
    System.out.println(User_id+" OLD End Date:" + Str2 + " New End Date: " + Str1);
    Map usermap2 = new HashMap();
    usermap2.put("Users.User ID", User_id );
    usermap2.put("Users.End Date", Str1);
    userClient.updateUser(ts,usermap2);
    userClient.enableUser(ukey);
    I am getting the following error:
    U0000018 OLD End Date:2009-09-30 12:00:00 New End Date: 2011-02-01 12:00:00
    2/12/2010 15:02:53 oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    Thor.API.Exceptions.tcAPIException: The user cannot be enabled because the end date is passed.
    Not sure why it is happening. It looks like the Updateuser is not working, or something else?
    Please advise. Thanks in advance.

    Hi Suren,
    thanks for the note.
    I found that as soon as I enable the user, I am getting the followimg messages in the opmn logs:
    INFO,06 Dec 2010 10:55:41,841,[XELLERATE.JAVACLIENT],System Event Handler: Validating Organization for an User.
    INFO,06 Dec 2010 10:55:41,944,[XELLERATE.JAVACLIENT],System Event Handler: Triggering Processes related to User.
    INFO,06 Dec 2010 10:55:42,402,[XELLERATE.JAVACLIENT],System Event Handler: Enabling the User
    INFO,06 Dec 2010 10:55:42,421,[XELLERATE.JAVACLIENT],System Event Handler: Validating Organization for an User.
    INFO,06 Dec 2010 10:55:42,427,[XELLERATE.JAVACLIENT],System Event Handler: Triggering Processes related to User.
    INFO,06 Dec 2010 10:55:42,439,[XELLERATE.JAVACLIENT],System Event Handler: Changing application data based on Organization change.
    INFO,06 Dec 2010 10:55:42,442,[XELLERATE.JAVACLIENT],System Event Handler: Auto-Group Membership Event.
    INFO,06 Dec 2010 10:55:43,715,[XELLERATE.JAVACLIENT],System Event Handler: Evaluating User Policies
    So, the access policies are getting evaluated, triggering provisioning processes.
    What I am planning to do is, to disable the access policies and try to run the Program.
    Because of this issue, my Program is throwing an error (until I looked into the opmn logs, it doesn't make sense).
    6/12/2010 10:55:50 oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    Thor.API.Exceptions.tcAPIException: Error occurred enabling Xellerate User instance.
    Regards
    Vijay Chinnasamy

  • OIM API portablity issue  with OIM 9.1 / Weblogic 10.3

    Hi , We have a existing piece of code which does some User Mutation through OIM API.
    [I am not well versed with OIM ]
    The code was running fine with Weblogic 8.3 and previous OIM version.
    Here is the piece of code.
    logger.info("Initializing OIM Params from config location:" oimConfigFileUtil.getOIMConfigBase());+*
    +          System.setProperty("XL.HomeDir", oimConfigFileUtil.getOIMConfigBase().getAbsolutePath());+
    +          System.setProperty("java.security.auth.login.config", oimConfigFileUtil.getOIMAuthWLFile().getAbsolutePath());+
    +          ConfigurationClient.ComplexSetting configClient = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");+
    +          env = configClient.getAllSettings();+
    *+          try {+*
    +               oimAccessFactory = new tcUtilityFactory(env, oimConfigFileUtil.getUserID(), oimConfigFileUtil.getPassword());+
    I traced all the dependecy's for this piece of code.
    If I run this with Weblogic.jar[8.1] it gives me
    java.io.InvalidClassException: com.thortech.xl.dataaccess.tcDataSet; local class incompatible: stream classdesc serialVersionUID = -5446056666465114187, local class serialVersionUID = -8857647322544023100*
    With the compatablity issue I substituted with weblogic.jar:10.3 , now its giving me all classpath issues.
    Can someone layout the exact jars that are required for this to work?
    Thanks
    Vignesh

    Installl a Design Console. Copy any files that are required. Then take the class paths that are listed in the classpath and basecp files and put those into your application classpath files.
    -Kevin

  • Raising Request using OIM ApI's in oim 11g R2

    Hi all
    I trying to raise a request using OIM API in R2. I have written a sample code and it is throwing me the below error....
    Exception in thread "main" java.lang.NullPointerException
    *     at oracle.iam.ui.custom.updateuser.<init>(updateuser.java:76)*
    *     at oracle.iam.ui.custom.updateuser.main(updateuser.java:118)*
    Please take a look at my code....
    RequestEntityAttribute rea = null;
    rea.setName("Modify User Profile");//This is the place where i am getting the error...
    System.out.println("I am Here3");
    rea.setAction(RequestEntityAttribute.ACTION.Modify);
    List<RequestEntityAttribute> lrea = new ArrayList<RequestEntityAttribute>();
    lrea.add(rea);
    RequestEntity re = null;
    re.setEntityData(lrea);
    List<RequestEntity> reqentity = new ArrayList<RequestEntity>();
    reqentity.add(re);
    RequestData requestData = null;
    requestData.setJustification("I need this Role");
    requestData.setTargetEntities(reqentity);
    String str = null;
    try {
    str = _service.submitRequest(requestData);
    } catch (InvalidRequestException e) {
    } catch (InvalidRequestDataException e) {
    } catch (RequestServiceException e) {
    } catch (BulkBeneficiariesAddException e) {
    } catch (BulkEntitiesAddException e) {
    Thanks in Advance

    look at below link
    Creating a Request via OIM 11g API
    http://www.pathmaker-group.com/querying-oracle-iam-requests/

  • Error while initializing OIM API in 11G

    I am trying to deploy a webservice exposing some of the OIM API's in 11G[11.1.1.5]. I am using the OIMClient API to initialize the API's. The following code works fine when I run with in the eclipse but doesnt work when it is deployed on the weblogic server[10.3.5]. This is a standalone server where no other web app is deployed. Has anyone faced this issue before. Any pointers on this would be helpful. Thnaks in advance.
    System.setProperty("java.security.auth.login.config", "./authwl.conf");
    Hashtable<String, String> env = new Hashtable<String, String>();
                   env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, providerURL);
                   env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, OIMClient.WLS_CONTEXT_FACTORY);
                   oimClient = new OIMClient(env);
    oimClient.login(userName, password.toCharArray());
    The exception is :
    java.lang.IllegalArgumentException: No Configuration was registered that can handle the configuration named xellerate
    java.lang.IllegalArgumentException: No Configuration was registered that can handle the configuration named xellerate
    at com.bea.common.security.jdkutils.JAASConfiguration.getAppConfigurationEntry(JAASConfiguration.java:130)
    at javax.security.auth.login.LoginContext.init(LoginContext.java:243)
    at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
    at Thor.API.Security.LoginHandler.weblogicLoginHandler.login(weblogicLoginHandler.java:58)
    at oracle.iam.platform.OIMClient.login(OIMClient.java:134)
    at oracle.iam.platform.OIMClient.login(OIMClient.java:129)
    at au.com.suncorp.oim.custom.spml.SuncorpOIMOperations.getInitializedOIMClient(SuncorpOIMOperations.java:113)
    at com.suncorp.test.oim.custom.spml.OIMWebServiceSoapBindingImpl.identitySearchByName(OIMWebServiceSoapBindingImpl.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Edited by: vindla on 16-Feb-2012 01:10
    Edited by: vindla on 16-Feb-2012 01:14

    1) please ensure that the war file which you deploy in WLS is pointing to the authwl.conf file on the machine hosting the war.
    2) apart from that make sure you have the following jars added to the calss path or added to the lib folder of the war.
    commons-logging-1.1.1.jar;
    oimclient.jar;
    spring.jar
    try removing extra libraries and jars from the war file. it sometimes give errors.
    i have done exactly the same thing and it works fine.
    rest it looks fine
    ======code snippet====
    System.setProperty("java.security.auth.login.config","/path/authwl.conf");
    System.setProperty("OIM.AppServerType", "weblogic");
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://host:14000/oim");
    try {
    oimClient.login("xelsysadm", "password");
    } catch (LoginException e) {
    e.printStackTrace();
    OIMClient oimClient = new OIMClient(env);

  • Transaction management in stateless session beans.

    Hi all,
    I am using EJB 1.1.
    I have a statless session bean that has two methods- A and B.
    which does not involve any database interaction
    like inserting/updating/deleting the data in the database.
    The process flow is such the client always calls A first followed by the call to B.
    I have the Transaction attribute set as TX_REQUIRED at the whole bean level.
    Now my question is as follows:
    Since it is a stateless bean, ejbCreate() is called for every method's invocation.
    So does it mean that a new transaction is started for every method invocation?
    Also since a transaction ends by commit/rollback.
    The transation associated with the method A/B will never get completed as there is no commit/rollback involved in method implementation.
    So how is this transaction ended?
    Any more details about the transaction management in stateless session beans is highly appreciated.
    Any input at the earliest is highly appreciated.
    Thanks in advance.

    Since it is a stateless bean, ejbCreate() is called for every method's invocation.For stateless session bean , Create() is not delegated to the instance.
    So does it mean that a new transaction is started for every method invocation?This depends opon the Tx attribute and sequence of calls. Since you have given Tx_required then if you call any method and there is no Tx context associated with client,then a new TX will be started by container othere wise it will execute in the same TX context as the calling client. Note that client can be jsp or other ejb method.
    Also since a transaction ends by commit/rollback.
    The transation associated with the method A/B will never get completed >as there is no commit/rollback involved in method implementation.
    So how is this transaction ended?If you are using COntainer managed TX then Transaction handling like starting , ending etc is handled by the container. You need not worry about that.
    Any more details about the transaction management in stateless session >beans is highly appreciated.
    Any input at the earliest is highly appreciated.Some time back I had read the article on how the Transaction management done by container on IBM Site. I dont have URL , but you can search the site.
    HTH
    -Ashwani

  • Receiving Transaction Manager Time out in iProcurement Receiving!

    Hi All,
    Database:10.2.0.4.0
    Oracle Aps:12.0.6
    O/S:AIX 64 bits 5.3 L
    We are unable to create any receipts due to following error.Checked Receiving Transaction Manager and that is running fine.
    Error Message
    Your receipt could not be created successfully because your receiving transaction manager timed out.
    Please contact your System Administrator for further assistance.
    Steps To Reproduce
    The issue can be reproduced at will with the following steps:
    1. In Iprocurement select requisition to receive
    2. Enter required data and press submit
    3. on screen receive Items: review and submit get above error message
    Profile RCV: Processing Mode is currently set to 'online'
    Could anyone please share resolution to such an issue faced before.
    Thanks for your time!
    Regards,

    Follow the Metalink ID: 375152.1

Maybe you are looking for

  • How do i read complete line from a text file in j2me?????

    how do i read complete line from a text file in j2me????? I wanna read file line by line not char by char..Even i tried with readUTF of datainputstream to read word by word but i got UTFDataFormatException.. Please solve my problem.. Thanks in advanc

  • Auto sort incoming email based on message content and subject

    I am trying to do what it says above. I have created a smart mailbox and that will put on copy of the message in the mailbox and one in my inbox. How can I do it so it will be automatically added to that mailbox instead of my inbox? Thanks, Daniel

  • Populating select-options in a variant through selection variable

    I have a select-options on the selection screen of a report. I have created a variant for this report. Now i want to populate this variant field through selection variable (entries of table TVARVC). How can i manage to populate multiple values in thi

  • Can you use Drobo as external disk on WRT610N?

    I looked around on the forum here for info, but couldn't find anything.  I am attempting to hook up a Drobo to my WRT610N and it doesn't show up under the router setup page.  Am I doing something wrong or is this just not a supported device of this r

  • Dropping internet when I get a call on my vonage telephone system

    Every time I get or make a call through my voip (vonage) I lose my wireless connection..I have a wrt150n router. I use a corless phone with my vonage system. Is there any way to stop this from happening?