Any pointer to get C#/Java interaction?

C

christery

Got at java consumer to a producer that I want to connect to a pref.
C# or some other .net app,

on the producer side we went with java->jni- (thanks javah)>C->fortran
program connecting to our rdb database but I hope thats not the thing
to do on the windows end...

can it be done in a more simple way?

got the java app consumer up and running but would like to make it
into an dll and add a ref to it... cant just figure out how... ideas?
Or another (better) solution? pref without having to go jni/c again...

//CY
 
J

Jon Skeet [C# MVP]

Got at java consumer to a producer that I want to connect to a pref.
C# or some other .net app,

on the producer side we went with java->jni- (thanks javah)>C->fortran
program connecting to our rdb database but I hope thats not the thing
to do on the windows end...

can it be done in a more simple way?

got the java app consumer up and running but would like to make it
into an dll and add a ref to it... cant just figure out how... ideas?
Or another (better) solution? pref without having to go jni/c again...

Could you give more details about what you need to do? Are these
*data* producers/consumers, which you could hook up with a web service
for instance, or do you actually need direct "in process" interaction?

Jon
 
C

christery

Could you give more details about what you need to do? Are these
*data* producers/consumers, which you could hook up with a web service
for instance, or do you actually need direct "in process" interaction?

Jon

The producer/consumer is an SOA implemented project as a pilot, with
corba for transferring data (VMS->WIN and WIN->WIN), no webservice as
far as I can see (but havent worked with that so, what do I know),
this is built on OpenSis and works great, but i need to get the data
over to our normal .net environment - or get all others to go java...

about the in process, we got one of the srevices to implement event
handlig, the other just work with asking for data, so both sync/async.

for the one handelning events its importent to get events, not polling
- its a mesage broker and should not add to the latency of transfer.

//CY
 
J

Jon Skeet [C# MVP]

The producer/consumer is an SOA implemented project as a pilot, with
corba for transferring data (VMS->WIN and WIN->WIN), no webservice as
far as I can see (but havent worked with that so, what do I know),
this is built on OpenSis and works great, but i need to get the data
over to our normal .net environment - or get all others to go java...

If it's all SOA, then you just need to make sure that whatever service
is exposing the data does so in an architecturally neutral manner,
e.g. over a SOAP web service. You shouldn't need anything like JNI.
about the in process, we got one of the srevices to implement event
handlig, the other just work with asking for data, so both sync/async.

for the one handelning events its importent to get events, not polling
- its a mesage broker and should not add to the latency of transfer.

I'm not really sure I understand this part - if it's genuinely service-
oriented, you shouldn't need to hook into another process, you should
just be able to send messages to it.

Jon
 
C

christery

I'm not really sure I understand this part - if it's genuinely service-
oriented, you shouldn't need to hook into another process, you should
just be able to send messages to it.

Jon

Uhmm, what I got is a working fine but in java, service oriented
arcitechture dosent imply web service, neither corba, or anything
else... and yes I am trying to use this without or without seeing java/
corba (loose cupling) but HOW? Still have to reuse the idl/sdl
generated interfaces produces the header file and implement the in c
and the make the .net code from there .... well if no one knows...

ill go that way... work work work...

//CY
 
J

Jon Skeet [C# MVP]

Uhmm, what I got is a working fine but in java, service oriented
arcitechture dosent imply web service, neither corba, or anything
else...

It usually implies an language neutral service, however - certainly
not something where you need to hook into the same process. While it
doesn't *have* to be language neutral, that's often one of the points
of making it SOA to start with - allowing for many different kinds of
clients.
and yes I am trying to use this without or without seeing java/
corba (loose cupling) but HOW? Still have to reuse the idl/sdl
generated interfaces produces the header file and implement the in c
and the make the .net code from there .... well if no one knows...

I would see if there are any CORBA service consumers for .NET - I
wouldn't start going to C interop unless you have to.

Jon
 
A

Arne Vajhøj

Got at java consumer to a producer that I want to connect to a pref.
C# or some other .net app,

on the producer side we went with java->jni- (thanks javah)>C->fortran
program connecting to our rdb database but I hope thats not the thing
to do on the windows end...

can it be done in a more simple way?

got the java app consumer up and running but would like to make it
into an dll and add a ref to it... cant just figure out how... ideas?

You want:

C#--(?)--Java------(network)------Java--(JNI)---C--Fortran--RDB

?

Obvious solutions are the one you mention:

C#--(DllImport)--C--(JNI)--Java-->

and to find a third party component that can wrap a
Java bean as a COM component so you can use:

C#--(COM)--X--Java-->

(that X will use some JNI internally is not your problem)

Arne
 
A

Arne Vajhøj

Arne said:
You want:

C#--(?)--Java------(network)------Java--(JNI)---C--Fortran--RDB

?

Obvious solutions are the one you mention:

C#--(DllImport)--C--(JNI)--Java-->

and to find a third party component that can wrap a
Java bean as a COM component so you can use:

C#--(COM)--X--Java-->

(that X will use some JNI internally is not your problem)

Additional comments relating to alternatives:

1)

I assume you have your reasons for --Java--C--Fortran--RDB instead
of just --Java--C--RDB.

2)

Or even better:

--Java--(JDBC)--RDB

3)

It would be much simpler if the Java code was not in process:

C#--(socket)--Java-->

is very straightforward. And practically any functionality should
be possible to implement over a socket.

4)

If you go that route and assuming that do not have too much
functionality invested in that Fortran code then why not combine
#2 and #3:

C#----------(network)------------Java--(JDBC)--RDB

A much simpler model.

Arne
 
C

christery

4)
If you go that route and assuming that do not have too much
functionality invested in that Fortran code then why not combine
#2 and #3:

C#----------(network)------------Java--(JDBC)--RDB

A much simpler model.

Arne- Dölj citerad text -

- Visa citerad text -

Ohh, its (the fortran progam) jumping around in the database on its
own (after a startpoint from rdb) always knowing where the next val is
in chunks on 50 real val on second values , lagrer on minutes or
presenting aggreagtees in another table ... depending on what you ask
for... and so on - using math not database all the time, not wanting
to go in there...
we sort of presave data (running 0 in to a contingues area) for each
new log/packets of logs and then know how its stored for all its
lifetime, it is a circular buffer. Get great prestanda but I dont want
to make any misstakes in the programming there.

I'm Starting with looking for X in C#--(COM)--X--Java--> ... but it
might all be as easy as c# -> wrapper dll in C -> jni -> java... now
that we done something like that in OpenVMS...

Thanks for the inputs.

//CY
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top