From: Daniel M. <dm...@li...> - 2003-11-03 15:26:57
|
I would agree with Anthony. Perhaps the URC will help you out. Another alternative is the design presented in the code sample (DynamicProtocolExample.java). I think you might have seen this before -- hopefully, Einat passed it to you. it demonstrates how to use the 0.7.x java RTK to serve multiple registry in the same logical code (though, you need separate EPPClient instances/connections for each registry). It uses java's introspection to dynamically run RTK code to perform EPP operations. Notice that there are no methods called directly on RTK classes -- instances of the Method class are used to run the show. This sample was built to demonstrate .org and .info running together, .biz could easily be added to the HashMap of epp versions. I think this design, although very verbose and difficult to read, will provide the most gains in terms of reuse of code between handling the same EPP commands over different EPP versions. The only issue which comes to light in this situation, is that the RTK properties are "universal" for the RTK. This might cause some headaches in coding to make sure, for instance, that the .biz connection uses the right certificates to connect to the registry (they use custom certs, right?). i.e. you might not want to (or be able to) share the same certs between all connections. So you'd have to customize the "ssl.props.location" property as you connect to each registry. The issue at heart here is that you can't use the 0.3.x, 0.4.x, and 0.5.x Java RTK in the same running application because all of the package names are the same (com.tucows.oxrs.epp.rtk.xml...). This was an issue raised a while back and Java RTK 0.7.x was released to try to solve this issue (after some consultation on this list). It combines all of the "popular" releases of EPP into a single jar. The packages from the previous releases were renamed in this pattern: com.tucows.oxrs.epp02.rtk... (.info) com.tucows.oxrs.epp0402.rtk... (.biz, .us) com.tucows.oxrs.epp0503.rtk... (.name) com.tucows.oxrs.epp0604.rtk... (.?) com.tucows.oxrs.epp0705.rtk... (.org) and org.openrtk.idl.epp02... org.openrtk.idl.epp0402... org.openrtk.idl.epp0503... org.openrtk.idl.epp0604... org.openrtk.idl.epp0705... Note though, that the short class names were not renamed. So the "EPPClient" name is used in all versions of EPP. This means you can't readily/easily "import" the package names if you're trying to serve all your TLDs through the same logical code (i.e. the same .java file). Like if you did something like this: if ( tld.endsWith(".info") ) { ... do the Domain check command for .info inline } else if ( tld.endsWith(".biz") ) { ... do the domain check command for .biz inline } .... but this might be useful... if ( tld.endsWith(".info") ) { InfoTldHandler.doDomainCheck(...); } else if ( tld.endsWith(".biz") ) { BizTldHandler.doDomainCheck(...); } .... In those handler classes you could use "import" statements to use the short RTK class names. Tho, this might result in a lot of duplicated code. It's all in the design... Dan Anthony Eden ?????: > No it is not true, we do it all the time. However we use the EPP-RTK > to connect to info and the NeuLevel RTK for biz, all wrapped up in a > nice unified interface which can be found at http://urc.sf.net/ > > Sincerely, > Anthony Eden > > Yuval Zantkeren wrote: > >> Dear All, >> >> Can someone please help us, we would like to know if there is any >> problem >> connecting to the .biz and .info from the same servlet? >> the .info guys told us that we will have problems to connect to both >> of the >> registries from the same servlet because the names of the commands are >> the same. Is it true and how can we solve it? >> >> Regards, >> >> Yuval Zantkeren >> >> Domain The Net Technologies Ltd. >> 81 Sokolov St. >> Ramat-Hasharon >> Israel 47238 >> Tel: 972-3-7600500 >> Fax: 972-3-7600505 >> www.DomainTheNet.com >> >> “This email message and any attachments hereto are intended only for >> use by >> the addressee(s) named above, and may contain legally privileged and/or >> confidential information. If you are not the intended addressee, you are >> hereby kindly notified that any dissemination, distribution or >> copying of >> this email and any attachments hereto is strictly prohibited. If you >> have >> received this email in error, kindly delete it from your computer >> system, >> and notify us at the telephone number or email address appearing above. >> Thank you" >> >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: SF.net Giveback Program. >> Does SourceForge.net help you be more productive? Does it >> help you create better code? SHARE THE LOVE, and help us help >> YOU! Click Here: http://sourceforge.net/donate/ >> _______________________________________________ >> Epp-rtk-devel mailing list >> Epp...@li... >> https://lists.sourceforge.net/lists/listinfo/epp-rtk-devel >> >> > |