You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Dain Sundstrom <da...@iq80.com> on 2007/10/31 19:24:13 UTC

Disable JaxB downloading of DTDs and XSDs

A few weeks ago I finally figured out how to stop JaxB from  
downloading DTD and XSD files, and even wrote about it on my blog  
(http://iq80.com/2007/10/disable-dtd-and-xsd-downloading.html).  The  
funny thing is, I swear I sent an email to this list about the fix,  
but David pointed out to me yesterday that it never made it here.

Anyway, the trick it to return a empty InputStream from  
EntityResolver.resolveEntity() method.  This is a really strange API  
because the empty stream is a kind of signal return value that means  
everything is ok, but there is not DTD.  If you return null, it is  
interpreted as a "request that the parser open a regular URI  
connection to the system identifier" which mean try to download.

Very lame, but it is finally fixed :)

-dain

Re: Disable JaxB downloading of DTDs and XSDs

Posted by Dain Sundstrom <da...@iq80.com>.
I couldn't find a jira for this.

-dain

On Oct 31, 2007, at 12:08 PM, David Blevins wrote:

> Excellent!  There's a jira for this we should find and close.
>
> -David
>
> On Oct 31, 2007, at 11:24 AM, Dain Sundstrom wrote:
>
>> A few weeks ago I finally figured out how to stop JaxB from  
>> downloading DTD and XSD files, and even wrote about it on my blog  
>> (http://iq80.com/2007/10/disable-dtd-and-xsd-downloading.html).   
>> The funny thing is, I swear I sent an email to this list about the  
>> fix, but David pointed out to me yesterday that it never made it  
>> here.
>>
>> Anyway, the trick it to return a empty InputStream from  
>> EntityResolver.resolveEntity() method.  This is a really strange  
>> API because the empty stream is a kind of signal return value that  
>> means everything is ok, but there is not DTD.  If you return null,  
>> it is interpreted as a "request that the parser open a regular URI  
>> connection to the system identifier" which mean try to download.
>>
>> Very lame, but it is finally fixed :)
>>
>> -dain
>>
>


Re: examples / direction of OpenEJB

Posted by Karan Malhi <ka...@gmail.com>.
Great!! . I agree , it is difficult to pick one scenario and show all
the concepts. However, right now, even if we have snippets or one
example per concept, even if they are not related, that would be cool.

Please do contribute your code examples.

On 11/1/07, Dario Laverde <da...@nycjava.net> wrote:
> The examples are not bad it's just difficult to come up with examples that cover all
> the annotations for instance without it becoming an actual sample application with
> many files.  But that being said I'd like to contribute my example code as well if
> that's ok.
>
> Re: the proposed JSR 299 Web Beans spec, I was thinking more along the lines of how
> to use Guice for DI.
>
> -Dario
>
> >> > Some examples would be super too.
> >>
> >> +1 My examples kind of suck :)
> > I disagree, your examples are very detailed and step by step.
> > I have been trying certain things with openejb and also giving demos
> > on them. So, I have some examples with DataSource, JPA, Dependency
> > Injection, Interceptors etc. Will start adding stuff to the userguide.
> > --
> > Karan Singh Malhi
> >
>
>
>


-- 
Karan Singh Malhi

Re: examples / direction of OpenEJB

Posted by Dario Laverde <da...@nycjava.net>.
The examples are not bad it's just difficult to come up with examples that cover all
the annotations for instance without it becoming an actual sample application with
many files.  But that being said I'd like to contribute my example code as well if
that's ok.

Re: the proposed JSR 299 Web Beans spec, I was thinking more along the lines of how
to use Guice for DI.

-Dario

>> > Some examples would be super too.
>>
>> +1 My examples kind of suck :)
> I disagree, your examples are very detailed and step by step.
> I have been trying certain things with openejb and also giving demos
> on them. So, I have some examples with DataSource, JPA, Dependency
> Injection, Interceptors etc. Will start adding stuff to the userguide.
> --
> Karan Singh Malhi
>



Re: examples / direction of OpenEJB

Posted by Karan Malhi <ka...@gmail.com>.
> > Some examples would be super too.
>
> +1 My examples kind of suck :)
I disagree, your examples are very detailed and step by step.
I have been trying certain things with openejb and also giving demos
on them. So, I have some examples with DataSource, JPA, Dependency
Injection, Interceptors etc. Will start adding stuff to the userguide.
-- 
Karan Singh Malhi

Re: examples / direction of OpenEJB

Posted by Dain Sundstrom <da...@iq80.com>.
On Oct 31, 2007, at 7:22 PM, David Blevins wrote:

> On Oct 31, 2007, at 5:19 PM, Dario Laverde wrote:
>
>> Hi all, just a couple of questions, I'm curious as to the beta  
>> release schedule and
>> if there are any new features or TODOs (e.g. web admin and  
>> examples) for the Tomcat
>> plugin for 3.0 final release.
>
> Off the top of my head, we need to fix up the invoker and jndi  
> viewer apps to support business interfaces.

I think we should just make it so that any object bound to jndi can  
be invoked.  IIRC there is a flag that says "if ejb allow invoke"  
that we can remove.

> Some examples would be super too.

+1 My examples kind of suck :)

>> Will (or are) webservice annotations be supported in
>> the Tomcat plugin?
>
> I think Dain's hacking on webservices now.

Yep.  I almost have jaxws working and hope to check it in tomorrow.

>> I've only just noticed the non-certified Geronimo distros, Little- 
>> G and Micro-G in
>> the release notes for Gernonimo 2 (although I don't see a download  
>> for the Micro-G).
>> How does OpenEJB compare with these from an end user perspective  
>> for someone who
>> hasn't used or doesn't need to use a full JEE 5 certified stack?
>
> Little and Micro Gs build from the gbean kernel, module, module  
> inheritance, repository, and dependency services etc.  They're  
> pretty attractive for people who require a more sophisticated  
> environment.
>
>> I know it's still early but what are the thoughts on the direction  
>> of OpenEJB 3.x
>> with regards to JSR 316 (JEE 6) and JSR 299 (Web Beans)?
>
> I personally am just getting ramped up.  No thoughts here.

Is Web Beans something we implement or something we integrate with  
like JSP or JSF?

-dain



Re: examples / direction of OpenEJB

Posted by David Blevins <da...@visi.com>.
On Oct 31, 2007, at 5:19 PM, Dario Laverde wrote:

> Hi all, just a couple of questions, I'm curious as to the beta  
> release schedule and
> if there are any new features or TODOs (e.g. web admin and examples)  
> for the Tomcat
> plugin for 3.0 final release.

Off the top of my head, we need to fix up the invoker and jndi viewer  
apps to support business interfaces.  Some examples would be super too.

> Will (or are) webservice annotations be supported in
> the Tomcat plugin?

I think Dain's hacking on webservices now.

> I've only just noticed the non-certified Geronimo distros, Little-G  
> and Micro-G in
> the release notes for Gernonimo 2 (although I don't see a download  
> for the Micro-G).
> How does OpenEJB compare with these from an end user perspective for  
> someone who
> hasn't used or doesn't need to use a full JEE 5 certified stack?

Little and Micro Gs build from the gbean kernel, module, module  
inheritance, repository, and dependency services etc.  They're pretty  
attractive for people who require a more sophisticated environment.

> I know it's still early but what are the thoughts on the direction  
> of OpenEJB 3.x
> with regards to JSR 316 (JEE 6) and JSR 299 (Web Beans)?

I personally am just getting ramped up.  No thoughts here.

-David


examples / direction of OpenEJB

Posted by Dario Laverde <da...@nycjava.net>.
Hi all, just a couple of questions, I'm curious as to the beta release schedule and
if there are any new features or TODOs (e.g. web admin and examples) for the Tomcat
plugin for 3.0 final release. Will (or are) webservice annotations be supported in
the Tomcat plugin?

I've only just noticed the non-certified Geronimo distros, Little-G and Micro-G in
the release notes for Gernonimo 2 (although I don't see a download for the Micro-G).
How does OpenEJB compare with these from an end user perspective for someone who
hasn't used or doesn't need to use a full JEE 5 certified stack?

I know it's still early but what are the thoughts on the direction of OpenEJB 3.x
with regards to JSR 316 (JEE 6) and JSR 299 (Web Beans)?

thanks,
Dario



Re: Disable JaxB downloading of DTDs and XSDs

Posted by David Blevins <da...@visi.com>.
Excellent!  There's a jira for this we should find and close.

-David

On Oct 31, 2007, at 11:24 AM, Dain Sundstrom wrote:

> A few weeks ago I finally figured out how to stop JaxB from  
> downloading DTD and XSD files, and even wrote about it on my blog (http://iq80.com/2007/10/disable-dtd-and-xsd-downloading.html 
> ).  The funny thing is, I swear I sent an email to this list about  
> the fix, but David pointed out to me yesterday that it never made it  
> here.
>
> Anyway, the trick it to return a empty InputStream from  
> EntityResolver.resolveEntity() method.  This is a really strange API  
> because the empty stream is a kind of signal return value that means  
> everything is ok, but there is not DTD.  If you return null, it is  
> interpreted as a "request that the parser open a regular URI  
> connection to the system identifier" which mean try to download.
>
> Very lame, but it is finally fixed :)
>
> -dain
>


Re: Disable JaxB downloading of DTDs and XSDs

Posted by Kevan Miller <ke...@gmail.com>.
That's great Dain. Thanks!
--kevan

On 10/31/07, Dain Sundstrom <da...@iq80.com> wrote:
>
> A few weeks ago I finally figured out how to stop JaxB from
> downloading DTD and XSD files, and even wrote about it on my blog
> (http://iq80.com/2007/10/disable-dtd-and-xsd-downloading.html).  The
> funny thing is, I swear I sent an email to this list about the fix,
> but David pointed out to me yesterday that it never made it here.
>
> Anyway, the trick it to return a empty InputStream from
> EntityResolver.resolveEntity() method.  This is a really strange API
> because the empty stream is a kind of signal return value that means
> everything is ok, but there is not DTD.  If you return null, it is
> interpreted as a "request that the parser open a regular URI
> connection to the system identifier" which mean try to download.
>
> Very lame, but it is finally fixed :)
>
> -dain
>