473,387 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Any pointer to get C#/Java interaction?

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
Dec 10 '07 #1
10 3493
On Dec 10, 10:40 am, christ...@gmail.com wrote:
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
Dec 10 '07 #2
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
Dec 10 '07 #3
On Dec 10, 11:22 am, christ...@gmail.com wrote:
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
Dec 10 '07 #4
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

Dec 10 '07 #5
On Dec 10, 1:24 pm, christ...@gmail.com wrote:
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.

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
Dec 10 '07 #6
On Dec 10, 1:48 pm, "Jon Skeet [C# MVP]" <sk...@pobox.comwrote:
I would see if there are any CORBA service consumers for .NET - I
wouldn't start going to C interop unless you have to.
Have a look at http://remoting-corba.sourceforge.net/

Jon
Dec 10 '07 #7
ch*******@gmail.com wrote:
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
Dec 11 '07 #8
Arne Vajhøj wrote:
ch*******@gmail.com wrote:
>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)
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
Dec 11 '07 #9
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
Dec 12 '07 #10

It is very easy to interact Java->.NET and .NET->Java.
Get JNI SDK for .NET 1.1
http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
for .NET 2.0
http://www.simtel.net/product.php[id]98653[SiteID]simtel.net
*** Sent via Developersdex http://www.developersdex.com ***
Jan 3 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Wolfgang Keller | last post by:
Hello, as a non-developer I am currently participating in an industrial "research" project to develop a so-called "web application". This application serves at the same time as middleware to...
5
by: Rasti | last post by:
Hello, I am trying to translate a C++ script to Java. Are there any differences between the C++ this-pointer and the Java this-pointer? Thank you
2
by: jb | last post by:
Hello everybody: I need help, and please let me know if python is the language of choice to implement following functionalities: I am trying to test a Java application and a C++ (win32)...
18
by: silversurfer | last post by:
Ok, this should be fairly easy for most of you (at least I hope so), but not for me: Let us say we have got the following elements: std::vector<Entry> models; //Entry is a struct...
41
by: Summercool | last post by:
Can we confirm the following? also someone said, Java also has "reference" like in C++, which is an "implicit pointer": Pointer and Reference --------------------- I am starting to see what...
4
by: Dan | last post by:
Hi All, I've got a problem with my C++ application that calls a Java class that I've built with GCJ, I can't run it because I get errors: multiple definition of `atexit' first defined here...
1
by: Carmen Sei | last post by:
to delcare an object with pointer - MyCar * mycar = new MyCar; mycar->Create(); ======================== to delcare an object without pointer - MyCar mycar = new MyCar; mycar.Create(); ...
9
by: sulekhasweety | last post by:
dear all, can anyone explain the differences between pointer variable and reference variables ?
2
by: humberto.bortolossi | last post by:
Greetings! I'm trying to control Java Applets using JavaScript. However, the standard recipes don't work under XHTML (they work well within HTML). See, for instance, the code ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.