cancel
Showing results for 
Search instead for 
Did you mean: 

utilizing EJB Environment Entries in different runtime env

Former Member
0 Kudos

Hello

We are in the process of moving to the NWDI environment.

Most of our EJBs are using the EJB Environment Entries (defined in the deployment descriptors)

Some of those EJBs rely on the fact that the same property will have different values in different runtime environments.

I have noticed that during the import process (from one env to another) done by the CMS there is no option to change those environment varialbles.

I have also noticed that there is no option to change the values of those environment entries during runtime in the SAPJ2EE 6.40 (that option existed in SAPJ2EE 6.20)

I just need to get an official answer;

Is there no way to control the values of the environment entries during deployment with NWDI?

Do we have to change our code (that relied on J2EE standards) so it does not expect different values in different runtime environments?

I have an open CSN about this, but no answer there yet...

<a href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smp_custmsg/main.do?event=LOAD&smpsrv=h">CSN 0120025231 0001708443 2005</a>

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

here is a link to a PPT I have prepared on the subject of substitution variables.

The "missing link" is decribed in slides 31-33

<a href="http://zachengel.googlepages.com/07SubstitutionVariables.zip">SubstitutionVariables.zip</a>

Former Member
0 Kudos

HI zach,

according to the notes, substitution variables x,y and z should be added to the sda-dd.xml.

i have done exactly the same thing as described in your PPT.

have u checked the xml file?? do u have the com.cp.var1 and com.cp.var4 (from the PPT) in the xml file...my xml file always has only the 4 ...

<variable-name>com.sap.sld.GatewayHost</variable-name>

<variable-name>com.sap.sld.GatewayService</variable-name>

<variable-name>com.sap.dc_name</variable-name>

<variable-name>com.sap.dc_vendor</variable-name>

what am i missing???

-sowmiya

Former Member
0 Kudos

did you create the build.properties as specified in the PPT (slide 31)?

this file tells the JDI to add some vars to the sda-dd.xml

note - the sda-dd.xml you see in the DC does not change,

but the one packed inside the EAR changes...

Former Member
0 Kudos

yes, i have everything as mentioned in the PPT. but the variables wouldn't showup.

may be we are missing some system configuration. the sda-dd.xml file i am looking into is from the ear file that's generated.

Former Member
0 Kudos

send your DCs to zach@checkpoint.com

maybe if i see it i will have an idea why it doesnt work for you.

try to include the build results in your zip file

Former Member
0 Kudos

Finally it worked!

So I unstall the sp19 first…..still I see C:\Program Files\SAP\JDT\eclipse folder has all the information. I went and removed the eclipse folder manually…

Then reinstalled…sp19…..

Things worked fine….the sda-dd.xml file will have the additional variable.

Every step is the same as it is mentioned the PPT.

thanks

sowmiya

Former Member
0 Kudos

Does anyone of you have the PPT for Substitution Variables? I couldn't get the file mentioned in above link.

Thanks

Former Member
0 Kudos

I got an answer from SAP in my message

<i>23.02.2006 - 16:46:55 CET SAP Reply

Dear Customer,

we support DC specific build options in a standard properties file

named "build.properties" that can be created in the "cfg" folder in

the DC root folder.

For substitution variables you can specify a property:

com.sap.sda.additional.substitution-variables=x,y,z

and the DC build will add the three substitution variables x,y and z

to the sda-dd.xml that is created (at least SP15 or newer).

Please try with this property.</i>

This worked

Former Member
0 Kudos

SDM (SAP's deployment tool/service) supports substitution variables. You can define them in the SDM Gui on each server and thus assign a different value to the same variable on each server. If I'm correct, you can use these variables in your deployment descriptors and SDM will replace them with the assigned values during deployment. See http://help.sap.com/saphelp_nw04/helpdata/en/f4/6c9962da317549a05919ce926b5196/frameset.htm for more information.

Former Member
0 Kudos

hi

I have the same problem describewd in this <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=45460">SDN thread</a>

to save you the time, it says that You must add the declaration within the sda-dd.xml

<substitution-variable>

<variable-name>com.vendor.yourVarName</variable-name>

</substitution-variable>

Note that if you write a Server library this file is displayed by the NWDS

However, if you are using a J2EE application module, this file is generated during the build and stored into the ear.

if you try using a substitution variable in your deployment descriptor without specifying it in the sda-dd.xml you get a deployment error -

com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable

(see full log message below)

As a workaround, I edited the sda-dd.xml after the EAR was generated (added the required entry), repacked it and deployed it.

Then it worked.

The problem is, if I use NWDI, I CANNOT edit the EAR that gets generated!

any idea of how to solve this?

<u>full log message of deployment error</u>

02/01/2006 13:58:13 /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR:

[001]Deployment aborted

Settings

SDM host : zaksrv2

SDM port : 50018

URL to deploy : file:/C:/DOCUME1/zak/LOCALS1/Temp/temp19284checkpoint.comtimeofftest5substear.ear

Result

=> deployment aborted : file:/C:/DOCUME1/zak/LOCALS1/Temp/temp19284checkpoint.comtimeofftest5substear.ear

Aborted: development component 'timeoff/test5/subst/ear'/'checkpoint.com'/'DEV_TIMEOFF6_D'/'20060102135547':

Caught exception during application deployment from SAP J2EE Engine's deploy API:

com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable [com.cp.sapGRP].

(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).DMEXC)

Deployment exception : The deployment of at least one item aborted