Progress - Java

Hadanmarv

New Member
Hi,

How can java works with the l4g of progress ?
Is there an architecture type responding to this problem ?

Thanks in advance.
Regards,

Hadanmarv
 

rstanciu

Member
Progress 10.0x->

In order to execute 4GL progress code from java
there are a lot of posibilites:

1) Using JDBC and SQL

2) Start an Appserver and use the JavaDirect connection
to Appserver to execute a 4GL Procedure

3) Start a Appserver (state-free) and expose the 4GL procedures
as WebServices, use JavaAxis package to call the procedure.

4) Start an Appserver and generate ProxyGen the sckeleton to be used in Java.

5) You can use SonicMQ (progress product) and JMS Messaging.
A 4GL batch procedure connect direct to SonicMQ broker and
wait for a JMS Message into a Queue or Topic.
The java application send a JMS message to Sonic and
start the 4GL proceure call.

6) start a webspeed broker and from java you can invoke a URL like:
http://localhost/cgi-bin/wspd_cgi.sh/myproc.p?param1=A&param2=B
by passing parameterts.

7) You can start a SERVER SOCKET in 4GL and call the URL from
java application
(see: OpenEdge-samples/sockets/WebServer)


(1-6) in all these case, you need another
progress procuct (AppServer/SonicMQ/WebSpeed)

If you want I can give you details from any of these solutions, sample,
config issues, etc.
 

Hadanmarv

New Member
hi,

first thanks for you reply.
Of course if you have some sample, it will be helpfull for me.
We have try to do some connection using an extends on com.progress.open4gl.javaproxy.AppObject but performance are very bad.
Thanks you in advance.

Regards,

Hadanmarv
 

rstanciu

Member
First go to $DLC/properties/ubroker.properties
and give more RAM to the appServer , search your appServer name
and add
jvmArgs=-server -Xms64m -Xmx1024m

try this sample using Appserver DirectConnect:

javac -classpath .:$DLC/java/o4glrt.jar sampleClient.java;
java -classpath .:$DLC/java/o4glrt.jar sampleClient;


import com.progress.open4gl.javaproxy.*;
import com.progress.open4gl.Parameter;

public class sampleClient {
private static final java.lang.String tName = new String( "KM_client" );
public static void nonPersistentProcedure() {
try {
// Connect to the AppServer
/*
Connection syntax is:
via NameServer:
[[AppServer:][//name-server-host][:name-server-port]/[service-name]]
DirectConnect:
[[AppServerDC:][//AppServer-host][:AppServer-port]
*/
//String appServerURL = "AppServer://rs:5163/asws";
String appServerURL = "AppServerDC://rs:3091";
Connection myConn = new Connection(appServerURL,"","","");
//change the operating mode to session free
myConn.setSessionModel(1);
OpenAppObject dynAO = new OpenAppObject(myConn, "asws");
// Create the parameters
Integer iCustNum = new Integer(9);
String cCustomerName;
// Create a place for RETURN-VALUE
String retVal;
// Create the ParamArray
ParamArray parms = new ParamArray(2);
// Set up input parameters
parms.addInteger(0, iCustNum, ParamArrayMode.INPUT);
// Set up Out parameters - notice the value is null
parms.addCharacter(1, null, ParamArrayMode.OUTPUT);
// Run the procedure
dynAO.runProc("getCustomerName.p", parms);
// Get output parameters - Returned as Object, so must cast
cCustomerName = (String) parms.getOutputParameter(1);
// Get RETURN-VALUE - Will return null for getCustomerName() procedure
retVal = (String)(parms.getProcReturnString());
dynAO._release();
System.out.println("Customer Name = " + cCustomerName);
System.out.println("RETURN VALUE = " + retVal);
} // try to catch all unexpected exceptions
catch ( Exception e ) {
System.out.println("Exception in sample()");
System.out.println("Exception Message: " + e.getMessage());
e.printStackTrace();
}
} //nonPersistentProcedure

public static void main(String[] args) {

sampleClient a = new sampleClient();
a.nonPersistentProcedure();

} //main

} // class
 

rstanciu

Member
you should post the Progress version too ...

anyway, if the owner of this site read this thread I want to advice to create 3 mandatory
combo-box's on "new thread" containing Progress version, Operating System and Progress
architecture (as CHUI, GUI, Web, OpenClient, etc.)

and explain what the java application have to do ...
 

rstanciu

Member
anyway, "Java/.Net and Progress" are like "the mouse and the cat".
I never see a "happy just married couple" Java/Progress.
I've spend 99% of my life with ... java.lang.NullPointerException
:lol:
The funny thing is ... java don't has "pointers" :mad:
 

GregTomkins

Active Member
Yeah I agree with tamhas that the original question wasn't clear, otherwise I would have jumped right in.

I have done a ton of Java and Progress and I think it works great. The main problem is that after a while I start to question all the things that we take for granted in Java - like multiple different data types for numbers, not being able to compare strings with equals signs, non-intuitive ways to handle money values properly, 25 hoops to jump through to get to the database, etc. - and wonder why as business developers they're even necessary. OTOH, garbage collection is pretty handy...

I have never seen NullPointerException's specific to Progress, of course, I've had lots of them due to general Java programming errors on my part ;)
 

rstanciu

Member
Java is good for "gadgets" as the Project GREEN or Mozaic-Applets.
Have you seen any car / airplaine fiyng with Java-On-Board ?
You dream !
 

GregTomkins

Active Member
I'm sure Java is good for lots of things, just not developing business (highly database oriented apps). One thing I like in Java - and I know I am about the only person on the planet who thinks this - is their GUI. I think .NET is a 10 out of 10, Java is a 9, and Progress is a 3.

I meant the actual GUI you give your customers, not the development GUI (IDE). If I meant the IDE I would have said 10-10-negative 1000.
 

rstanciu

Member
Ignore GUI, 70% of Progress Applications are CHUI, why ? because
the guy who tape the invoice, he wants to tape his invoice without regarding the
screen, print the invoice and make business.

The normal user is there for make business and not for click-click ... click-click ...

anyway ... take a look to these print-screens ... may be you can change d'advice :)

4GL is not a game-rendering enggine !

DLC = Data Language Companie.
DLC = Storeage Data + 4GL language.
 

Attachments

  • Capture-XP - VMware Workstation-1.jpg
    Capture-XP - VMware Workstation-1.jpg
    62 KB · Views: 36
  • Capture-XP - VMware Workstation-2.jpg
    Capture-XP - VMware Workstation-2.jpg
    77.1 KB · Views: 25
  • Capture-XP - VMware Workstation-3.jpg
    Capture-XP - VMware Workstation-3.jpg
    76.1 KB · Views: 26
  • Capture-XP - VMware Workstation.jpg
    Capture-XP - VMware Workstation.jpg
    70 KB · Views: 23

rstanciu

Member
java is good for "GPS devices", "T-mobile devices", "Photo devices" and "Tee-Sheers industry"
is good for a "universal remote control" but NOT for applications making business.

The "truck car" d'ont wait for you ... to click .... click ... in a wonderfull java GUI application,
the guy ... wants to sell his suff .... and go home !
 

GregTomkins

Active Member
"Ignore GUI, 70% of Progress Applications are CHUI"

If by that you mean "forget about using Progress for GUI", I agree, it's hopeless compared to the competition, and I'm not really interested in whatever .NET thing they have cobbled together, I can pretty much guarantee it still blows compared to C# or Swing.

If by that you mean "business users don't need GUI", then I beg to differ, just because CUI makes sense for some apps, we have generated somewhere around $100 million in revenues with Progress, around half of which would not have come our way if we had been CUI. GUI is a major factor differentiating us from our competitors.
 

rstanciu

Member
> "GUI is a major factor differentiating us from our competitors."

Ha ... ha ... this is maketing !

the egyptiens people handle this ...
2000 years ago,
.. my father too :
he was "acoounting manager" for 2500 employes, .. without PC :)
... only with a "pen and paper" he has able to write the $SUM
 

rstanciu

Member
In my opinon, Progress have to develop his own way ...

NO.java WAY !
NO.Net WAY !
NO.Google WAY !

... a real PROGRESS WAY ... !
 

tamhas

ProgressTalk.com Sponsor
It may be marketing, but it is certainly one of the factors driving sales. Try surveying a few APs about their experiences ... comfortably sailing along doing just fine with their feature rich ChUI application until some upstart shows up with a new flashy GUI product and the prospects start asking "why doesn't yours look like that" and thinking "this product is more modern, so it must be better". Sure, one hopes that real functionality and usability will win out in the end, but a great deal of sales and marketing is based on appearances ... if you don't pass the sniff test, you don't even get to do the demo.

As for used to being able to do it on pen and paper, the pace of business is changing. Things that used to take months now have to happen in days; things that used to take days now have to happen in minutes or seconds. If they don't, you lose sales, lose customers, lose business because you are not competitive.
 

rstanciu

Member
Agree !!!

The "sales-man" on Progress Company has a "life-time" <= 1,5 years.
He wants to sell and, of course, he invent "reasons".

I maintain an Progress application (Progress V.4 , SCO, 1984), ... years ago :)
The businerss work's, application work's !
everybody is happy, and the "sales" are ... not-Happy!
this is normal.

I think,
this is the time to let the "info-sales" to mv /dev/null
and return to our job ... deliver something who has a +value.

The result is sales bonus is = 0
my bonus is 160% :)

cool ... !
 
Top