cancel
Showing results for 
Search instead for 
Did you mean: 

One JAR file with class for all integration scenarios

Former Member
0 Kudos

All - I am sure this is hidden in somewhere..

Can I do the following

> Create a java class for simple lookup process or file reader process. JAR it

> Somehow need to import in such a way that is is available in all of XI i.e. any integration mapping process created should be able to use those get methods in the class..

Thanks and appreciate your response

m

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

"One JAR file with class for all integration scenarios" is <b>possible</b>:

(1) You need to import your JAR file with classes into I-Repository, as 1~M Mapping Objects; Those classes can be used within this by other objects <b>underlying the same software component version</b>.

(2) If you have Integration Scenarios distributed in the <b>different software component versions</b>, then you need to import your JAR files separetly to these software component versions.

If anything above is wrong, please let me know!

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Maddux,

<i>> Create a java class for simple lookup process or file reader process. JAR it</i>

Yes, you can do this and import it under any name space of your IMPORTED ARCHIVES of your SWCV.

<i>Somehow need to import in such a way that is is available in all of XI i.e. any integration mapping process created should be able to use those get methods in the class..</i>

Am not sure if this can be done across all software components, but , <b>if a JAR is imported under ANY NAMEPSACE in a SWCV, then that JAR is accesible in anyother namespace of the SWCV.</b>

Regards,

Bhavesh

Former Member
0 Kudos

Thanks Bhavesh - Is there a way for the get/set/other methods to appear as functions automatically or should I explicity invoke the class methods in another user defined function i.e.

JAR File has ClassA - getData() method

Should I create a user defined function to say

// ClassA1 = new ClassA1();

Class1.getData();

m

bhavesh_kantilal
Active Contributor
0 Kudos

M,

You will have to import the class in your User Defined Function and then create the object of the class and invoke the method whenever you need it.

The jar becomes like any other java class. If you need its methods, you import them and create the objects and then invoke the methods.

If you can give you requirements in more detail, maybe someother solution can be arrived at.

Regards,

Bhavesh

Former Member
0 Kudos

I will need to create one class ClassA. It has a method getData() for getting some info. This has to be used in many mapping programs. What is the optimized way ?

m

bhavesh_kantilal
Active Contributor
0 Kudos

M,

All mapping progrmas are executed independent of the otherin XI. You will have to write this UDF in every mapping program and call this method everytime in your mapping whenever you need the getData() info.

Load the JAR under IMPRTED ARCHIVES of any NAMESPACE and access it in any UDF. Am ntos ure if anyother method exists for this.

Regards,

Bhavesh

Former Member
0 Kudos

hi,

I had similar requirement. I used following steps

-Create java class(s).

-Bundle in a jar file & import under a namespace under 'imported archives'.

-create message template with a required user defined functions.

-use message template in mapping.This helps me avoid creating similar mapping each time where ever required.

hope this helps.

sachin kotalwar

Former Member
0 Kudos

Thanks for all your help !

m