Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RMI over two paths, one NAT'd

1058330Dec 4 2013 — edited Dec 12 2013

Hi,

I'm working on a server which interfaces with various types of clients:

- "Full featured clients" may only be able to see a load balancer / firewall VIP; the server IP may be NAT'd from them.

- "Admin clients" typically connect directly to the server.

It's very surprising that RMI / NAT is not handled better by Java.  Have seen various postings with references to 'java.rmi.server.hostname'.  However, it applies to the entire server process so won't work here.

Instead, I noticed that a single call to Registry.lookup() serializes multiple instances of RMIClientSocketFactory to the client (i.e. with different stack traces):

1) In the first instance, the host parameter of RMIClientSocketFactory.createSocket() is the VIP.

2) In future instances, it is the server's IP.


The solution that appeared to work for me is to use the host from that first instance in all future calls to RMIClientSocketFactory.createSocket().

Has anyone encountered this situation?  Did you find any better alternatives?

Thanks in advance.

Comments

Hoek

Just use the search box on the upper left on this page: Oracle Database Online Documentation 11g Release 2 (11.2)

Frank Kulash

Hi,

Post your answers, and specific questions about them.  (For example, if you're not sure what the question means, or how to find the answer, or if your answer really applies to all situations).

Let's take the last question you posted, for example:
"39. how many hints are there provided by oracle?"

You might wonder if they really expect an exact number, or if an approximation is good enough.  You might not know which manual contains the answer, or what keyword(s) to look up in the index to find the answer.

SomeoneElse

> please give me the answers for all.

You're kidding, right?


Chris Hunt
Please give me the answers for all.

Sure. Please give me all the money you get from the job, since it's me that'll be answering all the interview questions.

SomeoneElse

Actually, if I were to present these questions to a potential candidate the answer I'd want to hear is "wow, what a bunch of shitty questions".


Frank Kulash

Hi,

SomeoneElse wrote:

Actually, if I were to present these questions to a potential candidate the answer I'd want to hear is "wow, what a bunch of shitty questions".

Not entirely.

Some certainly are poor questions. Some require clarification; they might have meant something reasonable.

Some aren't bad interview questions.  For example:

"6. what is mutating table error? how can you solve that problem?"

I think this question is okay.  It is a common enough problem; and there are different ways (some good, some terrible) to deal with the problem.  How the candidate answers this question can tell you a lot about the candidate's experience and intelligence.

Hoek

Yup, most of those questions are outdated, from the previous century, or badly phrased....now "shall we create a table in the procedure"?

Mike Kutz

SomeoneElse

I partly agree with you, but I'd be more interested in hearing the person's reason on why they are bad questions.

On the other hand, if a person with zero(0) knowledge asks the questions, the local guru can then judge the candidate's capability of communicating Oracle concepts (to others) based on how much the interviewee has learned.

In that sense, the questions are perfect.

(except some of the syntax related ones)

MK

bandarupalli

yes these bunch of shitty questions are been asked by the interviewers....

because people like me are kids and people like you are dinosaurs in sql,pl/sql i thought...

but this is the platform which is connecting masters like you and learners like me so i'm requesting you to get answered ....

please help us .. if you can...

thanks in advance

SomeoneElse

>  learners like me so i'm requesting you to get answered ....

OK, but are you really interested in learning or just memorizing some answers to get through the next interview?

EdStevens

Where did you get this list?

A good interviewer doesn't necessarily ask questions as if it is a multiple choice or true/false test, but rather to see how the interviewee handles the question ... they aren't looking to see if you have a memorized answer but rather to evaluate how you go about solving a problem or if you are at least familiar with the resources available to help solve a problem.  I've even been known to pose a question that implies/assumes a falsehood, specifically to see if the candidate could catch it or if they would try to blow smoke.

It should be perfectly acceptable to respond with "that is a detail I can look up in <name the manual> when needed."

=================================================

Learning how to look things up in the documentation is time well spent investing in your career.  To that end, you should drop everything else you are doing and do the following:

Go to  docs.oracle.com.

Locate the link for your Oracle product and version, and click on it.

You are now at the entire documentation set for your selected Oracle product and version.

BOOKMARK THAT LOCATION

Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.

Spend a few minutes just getting familiar with what kind of documentation is available there by simply browsing the titles under the "Books" tab.

Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what kind of information is available there.

Do the same with the SQL Reference Manual.

Do the same with the Utilities manual.

You don't have to read the above in depth.  They are reference manuals.  Just get familiar with what is there to be referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.

Then set yourself a plan to dig deeper.

- *Read a chapter a day from the Concepts Manual*.

- Take a look in your alert log.  One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.

- Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.

- *When you have finished reading the Concepts Manual, do it again*.

Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.

=================================

bandarupalli

i wanna know them not answers but the concepts ....

reading some hundreds of pages is different to get explained..

i thought it was the right platform to learn, it is not big deal of interview but they are not getting satisfied with my answers because i have to learn something else not from books...

thats why i put almost all questions( even silly ones)

Thankyou

Frank Kulash

Hi,

This forum is a great place for people to ask questions and get them answered.  That doesn't mean it's the best place to get all questions answered.  Forums like this work best for specific, focused questions.  I gave some examples earlier of some specific, focused things you might ask about those interview questions.  "Answer these 39 questions." isn't a specific, focused question.   For one thing, it invites answers that cover things you already know, and don't help with what you need to learn.  Some examples of specific focused questions that can help you learn are:

  • "When they ask ... do they mean ... or do they mean  ...?"
  • "For this interview question ...is this a good answer: ...?  I'm not confident about ..."
  • "How would I find the answer to ...?  What buzzwords whould I look for?"
  • "For this interview question ... I looked up ... where it says...  Is that right?  It seems wrong to me because ..."
  • "Why would they ask something like ... on an interview?  Are they looking for an aswere such as ...?"
  • "Where can I learn more about ...?  I tried ... but ..."

Most people who answer questions on this forum are interested in helping you learn.  "If you give a man he fish, he will eat for a single day.  If you show him how to fish, he may eat for a lifetime."  Many people whould add "If you beat him over the head with a fish, he'll quit asking you for handouts."

Billy Verreynne

bandarupalli wrote:

yes these bunch of shitty questions are been asked by the interviewers....

because people like me are kids and people like you are dinosaurs in sql,pl/sql i thought...

but this is the platform which is connecting masters like you and learners like me so i'm requesting you to get answered ....

please help us .. if you can...

thanks in advance

The questions are shitty because.. well they are. They do not measure PL/SQL or Oracle expertise in any way. Here's my answers to a few of these interview questions.

5. what is the third parameter of the raise_application_error()?

Look it up in the fricken manual idiot. Besides. not wrapping a system call like that in an application wrapper is the problem.

6. what is mutating table error? how can you solve that problem?

The problem is solved by putting brain in gear before doing a physical database design of the logical data model, instead of using triggers as sticky tape to glue cr@p together.

27. shall we create a table in the package?

Yes we can - as all packages are not application interfaces and an API can be a system level API and deal with data management. There are no such rule of "Thou shalt not use DDL in PL/SQL", except for in the mind of the ignorant.

And this is why the questions are shitty. It pretend to measure expertise, but are horribly flawed as these questions are based on assumptions and exceptions, and presuppositions, with a poor understanding of what technical expertise is, and a very limited understanding of actual Oracle technologies.

In other words, these are random interview questions pulled from blogs about Oracle and Oracle related problems - and not even good blogs... (never mind using the fricken Concepts Guide to probe the understanding of the person being interviewed of Oracle fundamentals).

I would not take kindly to being asked such questions in an interview.

BluShadow

Billy, you're hired!

Billy Verreynne

The single most critical question - what is the availability of filter coffee at workplace like? And if not 99.9999% during the hours of 6AM to 4PM, then no thanks.

BluShadow

Each department has it's own kitchen so you can make whatever drinks you like for yourself.

Plus the canteen has a Costa (lotta) Coffee facility. 

Me personally, I'm not a coffee drinker. 

1 - 17
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 9 2014
Added on Dec 4 2013
4 comments
3,182 views