Hi all,
In the J2EE Developers Guide, there are 2 examples of
using coded name, one for sending email and other
connecting to URL. In the examples, the TYPES for it
are given javax.mail.Session and java.net.URL.
Now my question, Is there any particular way you have
to write a class , so that i can used from J2EE or any
Java class be used through the coded name??
gopal
sample taken from dev guide
try {
context = new InitialContext();
url =
(URL)context.lookup("java:comp/env/url/MyURL");
connection =
(HttpURLConnection)url.openConnection();
responseCode = connection.getResponseCode();
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
Coded Name url/MyURL
Type java.net.URL
Authentication Container
URL http://<host>:8000/index.html
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".