cancel
Showing results for 
Search instead for 
Did you mean: 

Usermanagement API in EP6 SP2

Former Member
0 Kudos

Hi,

In the API JavaDoc for com.sap.security.api.IUserFactory class following methods are described:

invalidateCacheEntry

invalidateCacheEntryByLogonId

invalidateCacheEntryByUniqueName

But those methods are actually missing from the binary interface contained in com.sap.security.api.jar. We are using EP6 SP2 Patch3, J2EE 6.20 PL 20. Do I need a more recent patch?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Viktor,

Sorry, I don't have an answer to your question. my installation of EP6.0 sp2, patch 2 HF4 PL 20 does not have this too.

Since you seem to use the API's I was wondering if you could solve my problem. I am initializing the UMFactory. When I try the following piece of code

UMFactory umf = UMFactory.getInstance();

IUserFactory _userFactory = UMFactory.getUserFactory();

I get an exception “java.lang.IllegalStateException: Could not initialize UMFactory! Please set property 'ume.cfg.path' or call UMFactory.initialize() first”

After going thru http://help.sap.com/saphelp_47x200/helpdata/en/6d/4cc63d3b3ffb4fe10000000a114084/frameset.htm, it says that files loaded correctly into PCD will have the .bak extension. I have not found any files without the .bak extension. So, The EP6.0 installation was successful.

Any ideas how I resolve this problem. If you could indicate, how you are initializing the UMFactory, that would be be great.

Thanks

Bhanu

Former Member
0 Kudos

Hi Bhanu,

Here is an exceprt from a dao class I have written to attach to the UME api and handle my user management tasks.

To get an instance of a UMFactory, use the static method of UMFactory <b>getUserFactory()</b>. Try my code, basically remove the getInstance method from yours. It works on my system, so if you still get your error, then you may have a config problem after all.

This should get you going. Let me know how it goes.

mark.hockings@SABMiller.com

//----


package com.sabmiller.portal.contacts;

/*

  • Created on 25-May-04

*

/

import com.sap.security.api.*;

import com.sapportals.portal.prt.logger.*;

import java.util.ArrayList;

/**

  • @author mhockings

*

  • This class acts as the DAO to the ldap directory, providing functionality such as searches

*/

public class ldapDAO {

private IUserFactory userFactory;

//reference to Logger to be used if loggin is switched on

public ldapDAO(){

//instantiate UMFactory to enable ldap querying

userFactory = UMFactory.getUserFactory();

}

Former Member
0 Kudos

Thanks Mark. I will try this out. However I have one question. My code is an independent JSP application which is being deployed in EP6.0. Will it work without the getInstance() method?

Former Member
0 Kudos

The UMFactory.getUserFactory() static method provides a new instance automatically for you. As long as you have access to the class UMFactory, you should get an instantiated IUserFactory object back.

How do you mean 'independent' JSP application? It should have access to all the relevant resources if it is running on the Portal Runtime, so I think you should be ok.

Former Member
0 Kudos

Hi guys,

Thanks for an interesting discussion. Bhanu, your question to me is already answered.

Can we now get back to the original topic of this thread?

Thanks

Former Member
0 Kudos

Hello all,

I appreciate viktor would like us to respond to his query, unfortunately i dont have an answer to that either, howvever i have got another question in relation to HOW to use UMFactory.

It seems that UMFactory can only be initialised if we have a portal environment running, does this mean we just create a portal applicatoin via Netweaver Developer studio or can we also create a servlet or may be an EJB which can utilise UME api? It seems that if we do create a servlet or an EJB app, then we need to include the portal libraries, if yes, then how do you figure which libraries to include etc...

I guess i sort of lost as i am struggling to figure how to write a servlet or an EJB which utilises UME and can do updates to UME. What are the prerequisites and how do you know what they are? I dont think any of the javadocs i have read so far seem to suggest anything like it.

I am trying to use Netweaver Developer Studio.

I can quite clearly see from MARK HOCKINGS posting that he is importing portal logger api, now how have you written this app and how have you deployed it? Can you run this app via Netweaver Developer Studio, if yes then how?

Any help is much appreciated.

Thanks,