You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by efe4dsip <ex...@sncf.fr> on 2012/10/17 15:00:12 UTC

Possible to select Compiler used by CXF ?

Hi

I am currently trying to get a webapp deployed, that expose some webservices
build on CXF stack.

The application developpers have delivered during last iteration a
webservice that must be called the
"Dynamic Invocation Interface" way. That means the stubs will be generated
on the fly, and then must be compiled.

In addition, my platform provider says we will not be allowed to use a JDK
on target platform.

As tomcat distribution includes from 5.5 onwards the eclipse JDT compiler,
used by JASPER using 
the "Compiler API" (see org.apache.jasper.JspCompilationContext), JDT could
maybe be setup as alternative compiler.

Is there a way to tell CXF which compiler to use?

My target platform is 
	Oracle-JDK-1.6 
	tomcat-5.5 (7.0.x soon) 
	cxf-2.3.0

Regards



--
View this message in context: http://cxf.547215.n5.nabble.com/Possible-to-select-Compiler-used-by-CXF-tp5716831.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Possible to select Compiler used by CXF ?

Posted by efe4dsip <ex...@sncf.fr>.
Thanks for the quick answer Dan.

I dug further into CXF trunk to find when "forceFork" switch has been
introduced in CXF-Compiler class called by DynamicClientFactory (rev903346).
I looks like the modification has been included back to branch 2.3.x, so I
guess that with a minor upgrade to 2.3.11 release, it may be possible to use
the JDT embedded into Tomcat.

Regards
Emmanuel



--
View this message in context: http://cxf.547215.n5.nabble.com/Possible-to-select-Compiler-used-by-CXF-tp5716831p5716989.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Possible to select Compiler used by CXF ?

Posted by Daniel Kulp <dk...@apache.org>.
On Oct 17, 2012, at 9:00 AM, efe4dsip <ex...@sncf.fr> wrote:

> Hi
> 
> I am currently trying to get a webapp deployed, that expose some webservices
> build on CXF stack.
> 
> The application developpers have delivered during last iteration a
> webservice that must be called the
> "Dynamic Invocation Interface" way. That means the stubs will be generated
> on the fly, and then must be compiled.
> 
> In addition, my platform provider says we will not be allowed to use a JDK
> on target platform.
> 
> As tomcat distribution includes from 5.5 onwards the eclipse JDT compiler,
> used by JASPER using 
> the "Compiler API" (see org.apache.jasper.JspCompilationContext), JDT could
> maybe be setup as alternative compiler.
> 
> Is there a way to tell CXF which compiler to use? 

Not that I'm aware of, no.   WIth that old of a version of CXF, it likely just calls out to javac on the command line. Thus, you may be able to jury rig something by having a javac shell script in the path or something.   

With more recent versions of CXF, we use the javax.tools.JavaCompiler API's available on Java6.    In that case, you would need to wire a tool into the standard ServiceLoader.load(..) things to load the appropriate JavaCompiler class.

Dan
 

> 
> My target platform is 
> 	Oracle-JDK-1.6 
> 	tomcat-5.5 (7.0.x soon) 
> 	cxf-2.3.0
> 
> Regards
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Possible-to-select-Compiler-used-by-CXF-tp5716831.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com