According to EJBrestrictions, it is NOT allowed to make a direct URLConnection from an 
EJB.

However, when I follow the recommendation in:
http://developer.java.sun.com/developer/onlineTraining/EJBIntro/EJBIntro.html, I have 
no success.


It seems like URL.getConnection(), not only makes a connection object but also 
CONNECTS making it impossible to specify the request dynamicaly using
URLConnection.setRequestProperty().

According to javadoc for URLConnection it should be possible:
".....
. In general, creating a connection to a URL is a multistep process:
The connection object is created by invoking the openConnection method on a URL.
The setup parameters and general request properties are manipulated.
The actual connection to the remote object is made, using the connect method.
The remote object becomes available. The header fields and the contents of the remote 
object can be accessed.
The setup parameters are modified using the following methods:

setAllowUserInteraction
setDoInput
setDoOutput
setIfModifiedSince
setUseCaches
and the general request properties are modified using the method:

setRequestProperty
....."

But when I call setRequestProperty, I get an exception, telling 'Already connected'.

I guess, I have misunderstood something - but what ?

regards
Hardy

===========================================================================
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".

Reply via email to