• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

SCAE - Question regarding consuming C++ applicaiton in Java

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MegaDreamDating Inc. is expanding from one office to five throughout the US. As part of this expansion they wish to upgrade their 'Dream date match' application, which matches requirements an ideal partner will have with registered users. Currently the 'Dream date match' is a standalone application (no network code), written on C++. It is likely that the requirements for this application may be extended yet again.

How should you extend this application so that it can be deployed in all the five offices?
Choose one answer.
a. As there is no built in network code, a complete rewrite will be required.
b. There is no need to extend the application, instead run five separate versions (one in each office).
c. Extend the application by integrating CORBA (create a CORBA server at head office) then use Java IDL at the regional offices to connect to the CORBA server.
d. Use JNI and RMI. Create a RMI server at head office and then create a client for use at the regional offices.
e. Use JNI and applets as in choice D but applets will connect to the JNI code at the head office.


I would prefer option e, since that would give more flexibility compared to option d where a client needs to be installed. and better manageability also .

But option d is given as correct

"Making the application available at all five regional offices will involve adding network code. But before this can be done, the C++ application needs to be able to talk to the network code. The most appropriate way of doing this is through the use of JNI. The new business logic can be added to the existing application and then made available to the other offices via RMI."

How many of you guys agree with the mock exam author ??
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Option D is better since if you deploy the c++ application in one location and access it from RMI server, it makes lot of things easier like

1) We don't need to make JNI calls from every client, since this will be done at the server end.

2) Security will be major issue when accessed from applets.

3) Use your web application to communicate with RMI instead of applet.

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per my understanding we can not make calls to C++ application only through RMI, we should use IDL(through CORBA) or RMI IIOP. So Option C might be suitable in this case.
 
Vinod Iyer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sriram sankar wrote:Yes Option D is better since if you deploy the c++ application in one location and access it from RMI server, it makes lot of things easier like

1) We don't need to make JNI calls from every client, since this will be done at the server end.

2) Security will be major issue when accessed from applets.

3) Use your web application to communicate with RMI instead of applet.



Thanks Sriram, very reasonable explanation. I am now convinced
 
Vinod Iyer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kumar Ala wrote:As per my understanding we can not make calls to C++ application only through RMI, we should use IDL(through CORBA) or RMI IIOP. So Option C might be suitable in this case.



JNI can be used to make calls to C++
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Appling the JNI is correct Way.


Cheers!
Prathap.
 
Kumar Ala
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do agree that we can use JNI to connect to C++, Can anyone explain why not the choice C.
 
Vinod Iyer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kumar Ala wrote:I do agree that we can use JNI to connect to C++, Can anyone explain why not the choice C.


yes corba can be used but won't it be an overkill for solving the current problem ??
 
reply
    Bookmark Topic Watch Topic
  • New Topic