Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Java/Perl Lingo

by jens (Pilgrim)
on Sep 19, 2002 at 23:40 UTC ( #199343=perlquestion: print w/replies, xml ) Need Help??
jens has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone here have experience using the Java/Perl interface?

I want to use Perl to integrate two systems, one of which is an SAP database that only supports a native Java API. So the choice is either to use Perl Expect to "automate data entry" if you will, or to attempt lower level API method calls.

Any suggestions, experiences, or ideas on this topic?

Microsoft delendum est.

Replies are listed 'Best First'.
Re: Java/Perl Lingo
by pope (Friar) on Sep 20, 2002 at 04:49 UTC
    Who tells you that SAP DB only supports native Java API? Install its ODBC driver, and connect to it via DBD::ODBC. Read more about how to do this.
      Who tells you that SAP DB only supports native Java API?

      Hmm...that would be my boss... <warm fuzzies>My boss is wrong.</warm fuzzies>

      Thanks for pointing that out, pope

      Cheers, all. Jens

      Microsoft delendum est.
Re: Java/Perl Lingo
by Anonymous Monk on Sep 20, 2002 at 00:40 UTC

    I have two thoughts on this. First is that it may be easier or more natural to do the integration work via the pre-existing Java classes. You didn't mention what the other system was using so there isn't much to go off of. I'm not sure how you normally get server systems to interoperate but there are a variety of interchange methods including SOAP, XML-RPC, CORBA, invent-your-own-language. Most of my work uses the standard Lotus Domino RPC so I can't speak to the efficacy of these new-fangled XML based interop methods.

    Now on to the perl part. My guess is that there's a C or C++ API to your database as well. My first inclination would be to write some XS code to access the C api. Second would be to use the C++ api (only because I haven't tried C++ XS yet). The issues you run into here are generalized to your skills with C and C++ and whether it will be any good or not. XS works great and it's how many of the fancy modules on CPAN work. XS is also ugly and you need to somewhat familar with Perl's internals.

    So here's a third idea. Consider Inline::Java, Inline::CPP or Inline::C. Some smart people have done all the magic work up front so you don't have to. The Inline::Java module is marked as very alpha and is something I'd use for an project I'm responsible for. The other Inline modules are more mainstream and are more likely to eat your dog and sell your cat. They're probably worth your time (again assuming you are going to use the C or C++ integration options I'm assuming you have around)

      Darn login widget. I thought I was logged but apparently not. Oh well.
•Re: Java/Perl Lingo
by merlyn (Sage) on Sep 20, 2002 at 13:39 UTC
      Looks simply amazing :) The only thing in that worries me about that is this line from the POD: "THIS IS ALPHA SOFTWARE. It is incomplete and possibly unreliable." I'm sure that the author is working hard to rectify that, and that it it certainly usable, but I still look with a little skepticism upon putting Alpha-level solutions into enterprise problems. Perhaps that's just my paranoia talking though.
Re: Java/Perl Lingo
by valdez (Monsignor) on Sep 20, 2002 at 08:56 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://199343]
Approved by ybiC
[muthusathish]: it is used in VB 6 appln, while debugging is getting error
[hippo]: Somebody has. Ask the author.
[Eily]: muthusathish ok, the fact that you can't tell what perl has to do with it proves it: this is not perl

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2018-02-23 09:20 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (301 votes). Check out past polls.