Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

java threads & oracle database

  Asked By: Craig    Date: Oct 05    Category: Java    Views: 1186
  

I tried concurrent access to a Oracle
database using the same connection object and ran into
some errors as <br>java.sql.SQLException Bigger Type
Length Than Maximum<br><br>java.sql.SQLException Bigger
Protocol Violation<br><br>java.sql.SQLException Not in
Streaming Mode<br><br><br>You can simulate the problem by
say having two threads say T1 and T2<br><br>you start
T1 and T2 simultaneously<br><br>and execute say 12
queries from both T1 and T2. Use the same connection
object for T1 and T2.<br><br>you will get the above
errors.<br><br>If you can solve the problem plz post it

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Husani Chalthoum     Answered On: Oct 05

Is your Oracle Database on a big server that your
company is paying for or the Oracle Personal edition that
you can download for free?<br><br>If it is the
personal edition, then you can't have concurrent  access
(at least that is what I was told...)

 
Answer #2    Answered By: Al Allen     Answered On: Oct 05

I am using oracle  8i
enterprise edition which is a licensed version. It does not
have this concurrent  access problem... as u say
it.. can there be any other problem

 
Answer #3    Answered By: Viola Hanson     Answered On: Oct 05

The only time I have had the concurrency problem
with a licensed version of Oracle 8i was when we were
using the connection  Manager to pass the connection
through a firewall. Unbeknown to us, client had set up
the max number of concurrent  connections to 8 in the
configuration. They swore the problem  was our code; and we
debugged this for three weeks. I checked out the OTN
(Oracle Technology Network) and low and behold they
described the problem and the solution. The client
was a little red-faced; and a little put out at
having to pay for the hours of debugging that THEY had
caused. I did check and the Personal edition limits the
number of current connections, also. But, that's why the
call it the Personal edition... it's for developers to
test with. Letting developers download it is a great
way for them to get to know Oracle (IBM does this
with DB2/UDB, also). If developers learn a DB, then
they are likely to recommend it to clients (because
they are familiar with it). Most developers are not
aquainted with the license costs...

 
Answer #4    Answered By: Arthur Cole     Answered On: Oct 05

The prefixing of the variable type is part of the
hungarian convention. Adding the scope to a variable name
was something put forward by microsoft. You'll see
these conventions in java  code , for the most part, by
those moving from VC++, C++ or VB to Java. <br><br>I
peronally don't find it useful. If I'm casually looking
through code I'm not going to have any more of a clue as
to what is actually going on by having types
prefixed to a varaible names. And when you look closer
it's pretty evident what datatype your working with
without any additional nomenclature. <br><br>As for
adding a scoping prefix I've personally hav not done
that but I could see some benefit. The only reason I
haven't is because I guess my general programming
practice. That being that when I'm writing, for example a
class, I'm either dealing with a stateful or a statless
object. If it's stateless everything is pretty much
method local while if it's stateful I'm dealing
primarily with memeber variables using a bare minimum of
local variables.<br><br>Other than the coding
conventions provided by sun there is a group of experienced
developers at Rogue Wave who put out conventions which are
generally accepted by the java community with open
arms:<br><br>www.ambysoft.com/...ngStandards.html<br>http://www.amazon.com/.../sr=8\
-1/ref=sr_8
_71_1/103-9033500-0132657<br><br>On a previous project a few years back the
architect
of the project purchased a copy of that book and
handed it to everyone on the team. I've been using it
ever since, and you'll find a lot of people who have
been using the language for a while will be as well.

 
Didn't find what you were looking for? Find more on java threads & oracle database Or get search suggestion and latest updates.




Tagged: