Skip to Content
0
Former Member
May 26, 2004 at 08:51 AM

How to build/use a library for WebDynpro related utility classes

34 Views

Hi all,

i tried to build a J2EE library to "pack" some utility classes together, which should only exist once in the container (generic sorting, filtering of context elements and more). I succeeded finally, but i'm not sure, if this is "legal" anyway or if there's a better way to achieve this. The library looks like this:

1. The classes are contained in one single jar at the moment, just for sake of simplicity. This will change in the future.

2. Since some of the utility classes are referencing WD-classes (like WDRuntimeException) again, an outgoing weak reference to the webdnypro service is defined. The Weak Reference appliance matrix in: http://help.sap.com/saphelp_nw04/helpdata/de/9a/4e4f3e065de946e10000000a114084/content.htm says, this is illegal for a library? On the other hand, there are some libraries like the "Remote Profile Library", which also have outgoing service references.

Here's the provider.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
<provider-descriptor>
	<display-name>libtest2</display-name>
	<component-name>libtest2</component-name>
	<major-version>1</major-version>
	<minor-version>0</minor-version>
	<micro-version>0</micro-version>
	<provider-name>ascoit.de</provider-name>
	<references>
		<reference 
			provider-name="engine.sap.com" 
			strength="weak" 
			type="service">webdynpro</reference>
	</references>
	<jars>
		<jar-name>asco-it.de~java~test~proj~deploy.jar</jar-name>
	</jars>
</provider-descriptor>

Any help is appreciated.

Regards

Stefan