for   
Save 
Save 
   Join IIUG  

Informix News
16 October 08 - VendorRate - Informix Earns Top Customer Satisfaction Score on VendorRate in Q3... Read
14 August 08 - IIUG.org - Sellout Expected for the 2009 IIUG Informix Conference... Read
29 April 08 - IntelligentEnterprise.com - IBM Informix Upgrade Enhances Clustering, Database Management... Read
29 April 08 - itweek.com - IBM 'Cheetah 2' mauls data costs... Read
28 April 08 - eWeek.com - IBM Uncages Cheetah 2 Data Server... Read
28 April 08 - CNNMoney.com - IBM Helps Clients Reduce Data Management Costs With New Informix Dynamic Server... Read
09 April 08 - CNNMoney.com - MediaSpan Embeds IBM Informix Dynamic Server Software for Delivering News to Print, Web and Wireless Devices... Read
08 April 08 - IT-Director.com - Informix seeks developers... Read
18 February 08 - marketwire.com - Icarus Studios Partners With IBM to Upgrade Performance, Availability for Its Online Games... Read
17 January 08 - eWeek.com - IBM Adds Mac Support to IDS for Higher Education... Read
17 January 08 - informationweek.com - Lotus Notes For iPhone Signals Closer Ties Between IBM, Apple... Read
16 January 08 - marketwire.com - IBM Informix Dynamic Server to Deliver Support for Mac OS X... Read
16 January 08 - internetnews.com - IBM's IDS to Support Mac Platform... Read
28 June 07 - REG Developer - IBM and Informix tie down Cheetah... Read
27 June 07 - CBRonline.com - IBM corrects its own Informix customer figures... Read
14 June 07 - vnunet.com - IBM changes spots with Informix 'Cheetah' database... Read
14 June 07 - eChannelLine - IBM expands scope for IDS... Read
14 June 07 - Resellernews - IBM: Informix database alive and kicking... Read
13 June 07 - DB2 Magazine - Cheetah is now out of the gate... Read
12 June 07 - IBM - IDS 11 release announcement (pdf)... Read
12 June 07 - ChannelWeb Network - IBM Uncages IDS 11, Aka Cheetah, Database... Read
12 June 07 - eWeek.com - IBM's 'Cheetah' Ready to Pounce... Read
12 June 07 - InformationWeek - IBM Unleashes 'Cheetah' Database... Read
12 June 07 - WebWire - IBM Strengthens Database Portfolio With New Informix Dynamic Server... Read
12 June 07 - Intelligent Enterprise - IBM Unveils Informix Upgrade... Read
12 June 07 - ComputerWeekly.com - IBM's Cheetah IDS makes leap to better data centre clustering... Read
12 June 07 - ebiz - IBM Unveils Next Generation Informix Dynamic Server... Read
12 June 07 - computerworld.com - Will 'Cheetah' help IBM's Informix chase down market share?... Read
12 June 07 - Internetnews.com - No Data Can Outrun This 'Cheetah'... Read
12 June 07 - de.internet.com - IBM neuer Datenbank-Server mit Codenamen Cheetah ist fertig... Read
12 June 07 - verifox.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - golem.de - Informix 11 vorgestellt... Read
12 June 07 - Computerwoche.de - IBM stellt neue Informix-Version vor... Read
12 June 07 - IBM.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - Heise - IBM gibt Informix 11 frei... Read
25 May 07 - Taiwan.CNET.com - Local Taiwan Informix user group established... (Chinese language) ... Read
18 May 07 - ChannelWeb Network - IBM Musters Partners For Cheetah Release... Read
18 May 07 - eWeek.com - IBM Looks to 'Cheetah' to Speed Up Blade Servers... Read
7 May 07 - DB2 Magazine - SQL Shortcuts - Use these tricks to generate IDS SQL scripts... Read

Previous news items
 

Home Member Area About IIUG


Resources
IIUG Insider
IIUG Hotspots
IBM-Informix Links
IIUG RSS Feeds
Software Repository
Informix Products
Online Resources
Informix Library
Informix Books
IIUG Banners
Discussion
Technical Special
  Interest Groups

Other Discussion
Community
Events
Webcasts/Chat w Lab
IIUG TV
IIUG Sponsors
Informix Business Directory
IIUG Press Partners
Local User Groups
Rate the Vendor
Job Board
Fun Stuff

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Development Tools Forum

RE: Java with informix 4gl shared objects

Posted By: Rivka Shisman
Date: Tuesday, 21 March 2006, at 4:24 a.m.

In Response To: Re: Java with informix 4gl shared objects (sergio@moredata.pt)

Hi Sergio

Can you please attach the Adapter and generator code?
It can be very helpful to us :-)

Thanks a lot
Rivka

-----Original Message-----
From: development-tools-bounces@iiug.org [mailto:development-tools-bounces@iiug.org] On Behalf Of sergio@more....
Sent: Monday, March 20, 2006 11:43 AM
To: development-tools@iiug.org
Subject: Re: Java with informix 4gl shared objects [71]

Hi

I have a project where I need to call 4gl from a Java Application Server
(Websphere).

I have passed by all the problems that Jonathan is speaking about.
I finished by develop a Java 2 EE Resource Adapter (J2EE Connector
Architecure) and a generator that parses the 4gl code and generates all
the necessary stubs.

This way all the 4gl code (without user interface) is exposed to a J2EE
stack in a matter of seconds.

It fixes the problems of multi threading and the problem of having JNI
linked in the application server that could be a huge problem in a
enterprise class aplication.

Sérgio

> On 3/13/06, MARK TYRER <m_tyrer@hotmail.com> wrote:
>> Tried posting to the classics sig - and they suggested that I try this
>> one.
>>
>> I have a need to expose functions within an informix shared object
>> (compiled
>> with informix 4gl 7.3 running against informix 7 db) to Java. The need
>> is
> such
>> that I must be able to call the java classes remotely. Currently I have
>> been
>> able to create a JNI wrapper for the shared object and am able to
>> connect
>> using RMI. For a performance test, I iterated a simple function, a 1000
> times
>> without a problem. However, as soon as I try to connect with a second
> session
>> (Running the same performance test), The java server class falls over
> because
>> the shared object reports a -439 error.
>
> Are you using threaded Java? I4GL code is not designed for use in
> threaded programs, and does not use thread-safe ESQL/C libraries.
> That could be the first problem - or it might be irrelevant.
>
> What is the message for error -439? Most people don't recall all the
> error messages (not even I do) and I had to go look it up. Please
> review: http://www.catb.org/~esr/faqs/smart-questions.html for a
> discussion on this.
>
> -439 Database server is currently processing an SQL task.
>
> This sounds ominously like a multi-threaded application trying to use
> the same connection for two different tasks at the same time. Failing
> that, it means that you somehow not waiting for the server to complete
> one task on the connection before attempting to do a second, and that
> normally implies multiple threads of control.
>
>> My java is a little shakey at best, so the answer may be staring me in
>> the
>> face. (Here is what I suspect - not what I know) However, my suspision
>> is
> that
>> the rmiregistry is a single process on the host box and runs the server
>> classes. I think that when I run the native function an informix
>> connection
> is
>> formed. When the second connection runs, It utilises the already formed
>> informix connection and causes a conflict.
>
> It is not clear to me what you mean by 'the second connection'; it
> seems to be something different than an 'Informix connection'.
> However, if you have a process 'rmiregistry' that is running the I4GL
> library on your behalf, then you need to be sure that you understand
> the I4GL and the ESQL/C models for supporting threaded applications.
> The I4GL support is simple to explain - there is no support in plain
> I4GL for threaded applications. What's more, it would be fairly hard
> to add it; there are rather too many global variables lurking around
> in the I4GL runtime support library - let alone in the typical piece
> of I4GL code - for it to be safe for multi-threaded use.
> Consequently, you would need to ensure that the code that invokes I4GL
> functions keeps the I4GL library single-threaded - presumably you'd
> need to code some sort of mutual exclusion system (a mutex) so that if
> one piece of Java is running an I4GL function, all other pieces of
> Java are kept out. Even with that mutual exclusion handled, there is
> a large probability that two separate Java threads will interfere with
> each other. For example, if two Java threads tried to run the same
> report at the same time, they would seriously interfere with each
> other - you would have to ensure that only one Java thread has a given
> report in the 'report started' state (pending FINISH REPORT or
> TERMINATE REPORT) at any time; the second thread must either be given
> an error (report is busy) or held up until the report is not busy.
>
> You can use multiple connections in I4GL, but the ESQL/C libraries it
> uses is not the thread-safe library, so you can only synchronously
> switch between the connections. In a thread-safe ESQL/C application
> (linked with the thread-safe ESQL/C libraries), you should ensure that
> any given connection is used by one thread at a time - and be
> extremely careful about which connection each statement was prepared
> on, etcetera.
>
>> Has anyone out there managed to get this kind of scenario to work?
>
> No, but neither have I tried. By the resounding silence, I suspect
> most other people have not tried either. Consequently, what I said
> above is hypothesis, not proven.
>
> --
> Jonathan Leffler #include <disclaimer.h>
> Email: jleffler@earthlink.net, jleffler@us.ibm.com
> Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>

*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.

Messages In This Thread

  • Java with informix 4gl shared objects
    MARK TYRER -- Monday, 13 March 2006, at 4:22 a.m.
    • Re: Java with informix 4gl shared objects
      Jonathan Leffler -- Saturday, 18 March 2006, at 11:31 p.m.
      • Re: Java with informix 4gl shared objects
        sergio@moredata.pt -- Monday, 20 March 2006, at 4:43 a.m.
        • RE: Java with informix 4gl shared objects
          Rivka Shisman -- Tuesday, 21 March 2006, at 4:24 a.m.

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Development Tools Forum is maintained by Administrator with WebBBS 5.12.

©2001 - 2007 International Informix Users Group.   All rights reserved.     Terms of use    
*** Powered By IBM Informix Dynamic Server V10.00 ***