After some source code reading I have gotten to the following
conclusion. To use URL, do this.
In ejb-jar:
<resource-ref>
<res-ref-name>MyURL</res-ref-name>
<res-type>java.net.URL</res-type>
<res-auth>Container</res-auth>
</resource-ref>
In jboss.xml
<resource-managers>
<resource-manager>
<res-name>urlref</res-name>
<res-url>http://some.website.org/page.html</res-url>
</resource-manager>
</resource-managers>
In bean entry:
<resource-ref>
<res-ref-name>MyURL</res-ref-name>
<resource-name>urlref</resource-name>
</resource-ref>
Does this seem to be correct?
If I also get it right from the J2EE spec it should be possible to use
file: as protocol and thereby get readonly access to files in the
filesystem.
Is this also correct?
//Peter
On 12 Apr, [EMAIL PROTECTED] wrote:
> Hey,
>
> It is there as far as I know. Just declare resource ref to url as in
> tutorial you refer to.
>
> Vladimir
>
> On Thu, 12 Apr 2001, Peter Antman wrote:
>
>> Hi,
>> is there any support in JBoss yet to get access to an URL via JNDI (like
>> the JavaMail support), as shown in the J2EE tutorial:
>>
>> 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());
>> }
>>
>> Have I missed it, or is it not there?
>>
>> Should we not have it?
>>
>> Anyone hade any thought about this? It does not seem that hard to
>> implement.
>>
>> //Peter
>>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
--
------------------------------------------------------------
Peter Antman Technology in Media, Box 34105 100 26 Stockholm
Systems Architect WWW: http://www.tim.se
Email: [EMAIL PROTECTED] WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942
------------------------------------------------------------
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user