on 05-10-2007 4:01 PM
Hi All,
can you please clear my doubt, is it posible use UDF(simple or Advance) in another SWCV?.
Thanks in Advance.
Hi Nag,
The user defiend functions(Simple or Advance) cant use in another SoftwareComponentVersion, because when you create a UDF that is stored where you mapped that UDF.
Cheers.
AshokKumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Its not true that we cannot use the UDF in another software component. Mapping class loader allows mapping program to access all classes of the boot class loader and only jar files in the same namespace where this mapping is located.
Therefore you need to implement your function in some static (or not static method) of some java file and pack this class to a jar file.
Then you have 2 options:
- put your jar to the boot class path of the J2EE server
- put this jar to every namespace where you going to use this function.
In the Message Mapping you'll need to create a wrapper for your function and that's a manual process for each mapping.
(OR)
But you can use a workaround to prevent manual creation of similar functions in all mappings. Just create a mapping template that contain all needed functions and then apply this template on each mapping you are working on. Even if your structure is different all functions from your mapping template will be added to the current mapping.
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Satish,
even if you can define the main application code in a .jar, you still have a User defined function that performs the calling method. And this UDF really can't be used anywhere else, per se. Of course, you can, as Bhavesh has said, use the same application in other UDFs, but nevertheless, your afirmation that "UDFs can be used in different mappings" is wrong.
The approach of reusing mapping templates works well, though.
Another "cleaner" (but a little harder) workaround is to export .mte file from mapping and copy the UDF reference part into another .mte which should be imported in the target mapping.
Regards,
Henrique.
Hi,
if you copy your massage-mapping (with the UDF) into the other SWCV, you could use your UDF there.
Regards
Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As Ahmad said cannot reuse the same UDF.
Regards
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
No you cannot do it, you need to create one UDF per SWCV that you are using or follow the Bhavesh advice, it seams a good approach.
Cheers,
Ricardo.
Message was edited by:
Ricardo Quintino
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
A solution to this ,
1.Create a SWCV that is the basic SWCV. All other SWCV's will be dependent on this SWCV/
2. Write a Java Class and wrtie the code in a mthod of this java class and import in under the imported archive of the basic SWCV.
3. Next you can now access this class in any uDF in any maping that is dependent on base SWCV.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
if u want to reuse the same UDF ,then no u cant use them .
thanx
ahmad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.