cancel
Showing results for 
Search instead for 
Did you mean: 

MDM4J and MDM Java Api 2

Former Member
0 Kudos

Hi,

I am working in SAP MDM Version 5.5 SP5 (5.5.40.83).

Now, i have 2 sets of jar file in 5.5.40.83

  • MDM4j.jar and

  • MDMAPI2.jar

Can, we use the classes present in MDM4J.jar, or it is deprecated.

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

It is possible to use both MDM4J and MDM Java APIs in the same program.But to perform the specific operation you have to use the either one.

E.g. MDM4J classes and methods have been used to connect to the repository and MDM Java APIs are used to retrieve the data from the repository.

In this case the program wont work, you have to connect the repository using the methods of both MDM4J and MDM Java APIs also.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi,

MDM Java API is is the "newer" API for MDM, and is recommended for new projects. However, it has only really come of age as of MDM 5.5 SP6 with new and fixed functionality, and a set of "extension" classes that make it easier to use than previous iterations.

The main differences between MDM Java API and MDM4J is the totally different architecture, and the fact that MDM4J loads the entire repository indexes into memory at runtime - a fact which causes some repositories to exhaust the Java heap memory.

For the version of MDM which you mention, I advise staying with MDM4J.

Walter

Former Member
0 Kudos

Hi,

Thanks for the reply.

I have another question in this.

Can i use both the MD4J.jar and MDM Java API's.... will I get problems because of this.

I tried a program to get the lookup table Name.... where i used the java api2 to connect to the repository, and get the table name and field info....

but i am using the mdm4j classes , just to retrieve the lookup table details... when i do that I am getting an error, as

Exception in thread "main" java.lang.IllegalStateException: Login method has not been successfully called.

at a2i.common.CatalogData.Preprocess(Unknown Source)

at a2i.common.CatalogData.GetField(Unknown Source)

at programs.GetLookupTableProperties.getLookupTableName(GetLookupTableProperties.java:17)

at programs.SearchWithParameters.main(SearchWithParameters.java:95)

Is this error, because of calling the MDM4J jar from MDM JAVA API2 ??

Can we use both the MDM4J and MDM Java API classes in the same program??

Request your inputs

Thanks.

Former Member
0 Kudos

Hi,

In order to use methods from MDM4J, you have to initialise a CatalogData object via the CatalogData.Login() method.

To use commands from the MDM Java API, you need to create and validate the necessary session.

The two API's have no knowlege of each other.

Walter

Former Member
0 Kudos

Hi All,

Thanks for the reply.

Thanks.

former_member201266
Contributor
0 Kudos

Hi venkat,

It nothing like deprecated, initally before the so called SAP MDM JAVA API's came into existence, there were only this MDM4j.jar or a2i API into existence and they did not have totall functionality of the tools, or to say more than common functionality; so they intorduced JAVA API's and it had all kind of functions which could server any purpose in MDM, where were not covered in MDM4j; and now the latest version 42.106 has allmost complete functonality of MDM4j and so we can only use SAP MDM Java API for version.;

For the version you specified; i dont have much idea wether it covers all Administrative functionality of MDM; so if you dont find any particular thing in SAP MDM JAVA API's Then its worth checking in MDM4J for the same version

Regards,

Cherry.

Former Member
0 Kudos

Hi,

Since you are using the same version of jars so it is possible to use the classes of both the jars you have mentioned.

But whenever you use the classes of MDM4J you will get the deprecated classes warning message.

E.g. import com.a2i.*;

You will get the message that "The import com.a2i is never used"

Regards,

Jitesh Talreja