Have you taken a close look at jakarta?
It is actually apache.

I don't think you should attempt to write any wrappers (there's definetly an easier way). Either consult the jakarta website and mailing list on how to configure jakarta to run perl (it'd probably include just editing one of the .xml in the /conf directory, probably server.xml), or just run a regular instance of of apache along with jakarta, and the regular apache will handle your perl stuff, and pretty much anything not contained in your jakarta document root, and jakarta will handle everything else. You can probably just run mod_j (something something, the apache mod plugin for java) from your regular apache server, and have your cake and eat it too. (perl conf's all taken care of, edit httpd.conf, point it to server.xml, load up the mod, and you're all set).

My point being, wrappers you have to write from scratch, and things can go wrong (plus you have to deal with security, and java %^).

It's easier to get 2 servers up and running. I've done it on my machine (granted it's win 98), even though I can't even try to run tomcat(i mean jakarta, i mean jakarta-tomcat, whatever) as a service, I've had success running the servers side by side. I also haven't had luck loading up the mod_j (something something), but I just didn't wanna use the module that bad (I got it to execute my java, I don't care how).

update:
Migrating to a java based website does in no way mean bye-bye perl, nor does it say helloooo wrapper. (that was funny ;-^)

As for the advantages of perl-2-java-bytecode, I've seen something, but I can't find it now. But I figure the only advantage (if the bytecode is as good as if it was compiled from java) is that it'd be executed like java, including all the memory hoopla that carries. This of course will slightly dent your development time of perl scripts.

Another thing to consider is the architecture of java programs, and packages for that matter. What are the consequences of compiling a perl script, which (for example) uses modules like CGI, DBI, and HTML::Template, to java bytecode.

Are you going to be compiling 500K java bytecode files for a 50k perl script?

Are you going to compile CGI and DBI to bytecode separately?

Are you going to add a java wrapper, and all it entails (like the memory managment), on top of the overhead of running perl scripts the way they normally do?

And what about mod_perl for example (or Fast CGI)?

If you want perl, run perl. If you want java, run java.

 
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void

perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"


In reply to (crazyinsomniac) Re: Jakarta Blues: Are Java Wrappers for Perl Practical? by crazyinsomniac
in thread Jakarta Blues: Are Java Wrappers for Perl Practical? by sierrathedog04

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.