dcsimg
URL of the server
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   A_JP
Posted On:   Wednesday, March 28, 2001 02:10 PM

Hi !
I've deployed my bean in development box, I've hardcoded my server url in my bean code. Now I wanted to deploy it in the production box, so I got to change the url in the code. Is there any optimal way so that the code is not touched when deploying in different machines(servers).

Thanks
AJP

Re: URL of the server

Posted By:   Shaun_Childers  
Posted On:   Thursday, March 29, 2001 10:21 AM

Yes. You can either set up a <>.properties properties file for storing information such as url, port #'s, JMS topic queue names, etc. and then have a startup class (startup with Weblogic) read in the properties file and have the values ready for any class wanting to know. YOu can also have the value stored in the properties file of the EJB server and just reference them through the EJB server. A third way is to store them in a DB table and have a class containing some JDBC calls to retreive the appropriate field and return its value.
About | Sitemap | Contact