Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Dazed/Confused from previous posts on how to call Java method from Perl

by iguanodon (Priest)
on May 12, 2016 at 23:28 UTC ( #1162900=note: print w/replies, xml ) Need Help??


in reply to Dazed/Confused from previous posts on how to call Java method from Perl

Get Connection Properties from database

Are your database connection properties stored in... a database? I can sort of see why you might want to keep the connection info in one place and use it from both Perl and Java. But if the Java programs connect to the database to get this info, IMO it would be easier to just have the Perl program make a DBI connection to get it as well. I admit I may not really understand the goal here.

  • Comment on Re: Dazed/Confused from previous posts on how to call Java method from Perl

Replies are listed 'Best First'.
Re^2: Dazed/Confused from previous posts on how to call Java method from Perl
by rgwest61 (Initiate) on May 13, 2016 at 14:21 UTC

    My apologies the database connection attributes (driver, url, username, password) are contained in a configuration file which is read and the associated attributes for the provided application id and retrieved and stored in the ConnectionProperties object. The Username and password values are encrypted and stored in the configuration file for security reasons. They are then decrypted before storing in the ConnectionProperties object. I still need detailed/specific code/instructions on what is needed to call the indicated class method. Thanks again for your time.

      Can you parse the config file and decrypt the credentials from the Perl program? If you absolutely need to get the connection attributes from the Java object I have to echo what Paladin said - look into Inline::Java, but I haven't done this myself.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1162900]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2022-05-23 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (81 votes). Check out past polls.

    Notices?