To all java expertise

Dear All,
I hv database issue, first i made my database connection as a application session so can share among all the user in one web application. so, user will share same database connection for SQL query, update or edit.
Does anyone try this before and what is the impact would be?
I always receive this error before once a while and do you think it is related to the shared database connection?
java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: JVM_recv in Socket input stream read

>
well, let me start (again) by saying this is just my
OPINION (I have been flamed once too many on this
subject...).
I would say EJB technology is somewhat overrated, and
then mostly the container managed ones. There are two
types, container managed and bean managed enterprise
beans. The container managed beans tend to slow down
an application alot once the dataload increases and
the datamodel gets more complicated. The amount of
objects involved in database activities is huge. Using
bean managed beans could remedy this, because you've
got total control on how the data is being
loaded/written, but even then, the overhead caused by
the whole container thing is alot. Now don't get me
wrong, for the bigger projects it's perfectly OK to
use the beans and an application server, but for
smaller projects (like the one you're in right now),
I'd definitely stick to using your own 'framework'. If
the design is good, you'll end up with a extensible
web application (maybe not as easily extendable as an
J2EE application, but that's hardly a guarantee
anyways...). For the most part (and this is where
people start to flame me) I think resorting to EJBs is
nice if the developers on the project are of the
'point and click' type, rather than the
'dos-edit/javac' type. That's not to say that the
latter type is better, but they would be better able
to judge whether an application needs to be
implemented using EJBs or just a good framework.
Hope it helps ?
Rishiseems getting to learn some real experience frm Java consultant. But i know there are always a room for improvement for any system.
At this moment, i just concern about the sharing connection from session application layer. Logically, this could
1) Saving the open/close connection time. It should be significant better performance if each time user connect across WAN using sharing session connection compare to open/close connection each time of user query to database.
2) Coding will be much more simpler, especially exception handling for opening JDBC database.
3) one way of not putting the database ID and password into every JSP or servlet page whenever wanted to connect to database. Somehow i feel sharing connection from application session is much more safer cause database id and password is only initialised once.
Anyone got better ideas or correct my mistake..is welcome

Similar Messages

  • Any way to increase the default Heap size for all Java VMs in Solaris 8

    Hello,
    I have a java product that deals with large databases under Solaris 8. It is a jar file, started by a cron job every night. Some nights it will fail because it runs out of Heap memory depending on the amount of records it has to deal with. I know that I could increase the java VM heap size with "java -jar -mx YY JARFILE" command but I have other java products that are showing the same behavior, and I would like to correct them all in one shot if possible.
    What I would like to do is find a system or configuration parameter that forces all Java VMs to use a larger MAX Heap size than the default 16M specified in the Man page for Java. Is there a way to accomplish that?
    TIA
    Maizo

    You could always download the source and modify it.

  • KEYBOARD DOESN'T WORK IN ALL JAVA APPS

    I think there are a bug with Java,
    but some keys of my French keyboard doesn't work with ALL Java APPS (Solaris Management console...), but work fine with all other apps.
    When I use Xsun, there are no problem, all keys work, but with Xorg, some keys doesn't work. (Only in Java Apps).
    I had got this bug with Sun Solaris 10 and Sun Solaris 11 (6/05 Express)
    This is a very nasty bug, I have got a PS/2 keyboard.
    Willits

    Enable multilib repo in /etc/pacman.conf , pacman -Syy and pacman -S flashplugin
    Last edited by Halcyon22 (2010-09-14 13:34:53)

  • Terminates all java virtual machine process

    How I can terminate all java virtual machine process which is running on a computer
    thanks
    daniel

    Too big topic to cover. Check out
    http://java.sun.com/j2se/1.3/docs/guide/intl/fontprop.html
    namely Specifying Fonts on Win32 Platform
    (http://java.sun.com/j2se/1.3/docs/guide/intl/fontprop.html#win32)

  • Compile one by one, or all .java-files at once?

    I just wanted to know if i have to, or if i can compile all java-files from a package, at the same time, or if i can compile first one file, and then the next.
    I ask, because till now i only tried java-applets with 1 .java-file...but now i am doing a bigger project, but i just don't get it to work =((...it won't even compile....so i hope u can help me...
    thx, ur Kay

    if i allready compiled something of my package...and i want to use those classes, which allready exist....can i include or import them?....i mean....i only want to compile my main-class again..my main .java-file i mean....do u know how to do that?

  • Import Packages - A Question to All Java-Professionals

    Question:
    I installed the J2SE 1.3.1_02, J2EE 1.3.1_01 and Forte Java CE 3.0. Why I can't use the Packages included in the j2ee.jar located in the \bin directory?
    I can't use the Packages like
    import javax.jms.*;
    import javax.sql.*;
    Why? Please to all Java-Experts. Thank you very much

    sorry this is kinda late, no I dont use forte, I use codewarrior , and I have not used the j2ee.jar but I have used the servlet.jar , activation.jar, and mail.jar . And I simply add a refrence to those files and Codewarrior sets the classpath for me.

  • Deleted all Java-related files from system

    Hello there, community!
    This issue will make me look like a dummy, but here it goes. Basically it is what I did yesterday, I erased all Java-related files from my computer for hideous reasons, now before considering a reinstall, I'd like to know whether there is a solution to this problem. My recovery partition still has Mavericks installed, which is weird, seeing as I am on Yosemite already.
    Basically most apps won't start, and that includes Finder, App Store and every other major app/resource I might need to use for a recovery.
    I tried to re-download Java from Oracle website and JDK, but .dmg files won't run either.
    I'm trying to look for as many solutions as possible before I do a recovery, because again, I don't have a Time Machine, and hope there will be a solution as I have lots of work to finish.
    Any type of help will be welcome!
    Mid-2011 iMac 21.5, Mavericks 10.10.1

    Hello EdNKh,
    Welcome to the Apple Support Communities!
    I understand that you are trying to reinstall Java but cannot get the .dmg to run. With the information you provided in your post, I would suggest using the information in the attached article to reinstall OS X Yosemite. Reinstalling with this information will keep your files and settings intact. 
    OS X Yosemite: Reinstall OS X
    Have a great day,
    Joe

  • All java files directory

    I need to know all java files directory by sample:
    /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin
    etcetera.
    I have deleted them all and i don't rember where those file where located, if i knew i would go to another mac computer and paste them to mine, because since i have delethed them all, i can't open safari, mail or app store and i don't want to reinstall the OS.

    FYI.... Here's the quick and dirty, slower than a wet week, ugly, but effective batch script
    set TIKE=C:\Java\lib\tikeswing-1.5
    set SRC=%TIKE%\src
    set LIB=%TIKE%\lib
    set CLASSPATH=%LIB%\commons-beanutils.jar;%LIB%\commons-lang-2.0.jar;%LIB%\commons-logging.jar;%LIB%\log4j.jar;.
    FOR /R %SRC% %%f IN (*.java) DO javac -d C:\Java\home\classes -cp %CLASSPATH% %%f
    @ECHO OFF
    REM http://www.robvanderwoude.com/ntfor.html
    REM Walks the directory tree rooted at [drive:]path, executing the FOR statement
    REM in each directory of the tree. If no directory specification is specified
    REM after /R then the current directory is assumed. If set is just a single
    REM period (.) character then it will just enumerate the directory tree.I can't figure out how do the equivalent of javac `dir /s /b *.java` (ie: cmd doesn't seem to have a built-in facility for expanding the results of a command into the command line) which would be a lot quicker and cleaner.
    Cheers all. Thanx for the help. I appreciate it.

  • QuickTime installation breaks all Java programs.

    There is a bug in the QuickTime installation program for Windows that causes all Java programs to fail whenever QuickTime is installed or updated. As part of the installation, QuickTime updates the system environment variable CLASSPATH to reference a Java .jar file needed by QuickTine in order to run properly. This reference is C:\Program Files\Java\jre1.6.0_01\lib\ext\QTJava.zip.
    The problem is that in Windows, any file path that contains whitespace characters must be enclosed in quotation marks. This is because on the command line, Windows interprets any whitespace character to be a parameter seperator. So when Windows tries to resolve the file path, it resolves to two seperate paths, "C:\Program" and "Files\Java\jre1.6.0_01\lib\ext\QTJava.zip". This causes all Java applications to generate the following error: java.lang.NoClassDefFoundError: Files\Java\jre1/6/0_01\lib\ext\QTJava/zip.
    The solution to this problem has been well known for years, is widely published, and is very simple to implement. Enclose the file path in quotation marks, so that the CLASSPATH entry is exactly as follows (including quotation marks) "C:\Program Files\Java\jre1.6.0_01\lib\ext\QTJava.zip". This tells Windows that everything inside the quotation marks is a single parameter, which then lets all Java applications run properly. Everytime there is a new version of QuickTime I have to field numerous complaints from co-workers that they can no longer run our Java applications. This bug has existed for at least two major release versions, 6.x and 7.x.
    Please fix this bug.
      Windows XP Pro  
      Windows XP Pro  

    A jar file does not have to be an installation program. The jar file can be your entire program neatly encased into one file. If you mess around with the manifest file, the jar file can be executed by double clicking on it.
    Example: You have a program that you execute from the command line using: java Program
    First, write a text file that has:
    Main-Class: Tagssave it as manifest.txt. Make sure to put a blank line at the end of the file. Then, on the command line, type:
    jar cvfm Prog.jar manifest.txt *.class
    Done! Double click on Prog.jar and let me know if that is what you were looking for.
    Brad

  • Capturing vfw: devices from JMF All Java

    Hi There,
    i am new to java.I have a problem that i am unable to capture devices that are vfw:/ devices from jmf registry.
    I am working on jmf for all java i.e. cross platform...
    If any one is having sollution plz send it to me
    Thanks in advance
    Sanket Parekh
    [email protected]

    Hi There,
    i am new to java.I have a problem that i am unable to capture devices that are vfw:/ devices from jmf registry.
    I am working on jmf for all java i.e. cross platform...
    If any one is having sollution plz send it to me
    Thanks in advance
    Sanket Parekh
    [email protected]

  • Swing uimanager affecting all java programs?

    I set a ton of UIManager properties like:
    UIManager.put("ScrollBar.thumb", java.awt.SystemColor.activeCaption);
    However, when I do this, these become the defaults for all java programs until the virtual machine is reset. This is kind of screwy!!! I set these values in one applet and change the look and feel of the java console and other applets that will be run. How is this possible? I don't know if this is a "bug" or just a poor design.
    Any thoughts?

    Maybe you should try just a few questions at a time?

  • Reinstall All Java

    Java does not seem to work for any browser (Safari, Firefox, IE). How do I deinstall and reinstall all Java compontents?

    Hello yutan:
    I think I would consider and archive and install:
    http://docs.info.apple.com/article.html?artnum=107120
    In that way, you will install a completely new copy of OS X while retaining your files, program, and settings (you will have to update the system to current levels).
    Barrry

  • Lost all java support

    Call me a newbie, but since I had to resintall my machine usnig a "service pack 2 edition" of windows XP not only I lost all java support, but also it won't even let me install netbeans as there's no longer a virtual machine in explorer. I installed Netscape to see if that fixed the problem, but it still won't let me install netbeans, same "no virtual machine found" message in the way. Is there any way I can recover java support?

    You apparently need to install the Sun's Java Software Develeopment Kit (SDK), from this page (if you want the most current Java 5 version):
    http://java.sun.com/j2se/1.5.0/download.jsp
    This is needed before you can install Netbeans.

  • All java GUI apps suddenly never repaint

    This isn't really a programming question, but I've had a hell of a time finding help resources elsewhere (Sun's got the balls to charge money for the support document that will most likely help me!). Does anyone know anything about what might cause all Java GUI apps to never repaint? I just installed the Java 1.5 update 4 JRE & JDK, I'm running Windows XP SP2, and I have dual monitors, although turning the second one off (via the control panel) doesn't seem to help.
    Neither my own software nor commercial software will work (even NetBeans). They all load an empty JFrame, or paint themselves once and never again. Console apps seem to work just fine, though. If anyone knows how to fix this, has any suggestions on what I should try, or can tell me where to look for a solution, I'd be very grateful.
    Thanks,
    Tim

    I appreciate the help, and maybe I'm not following you, but this is happening for ALL Java GUI apps, even NetBeans itself won't repaint. Not sure how I have control over NetBeans's UI thread?
    Thanks
    Tim

  • Difference between all-java & win-performance pack?

    Hi,
    Exactly what's the difference between the all-java JMF and the windows performance pack? In terms of files?
    TIA,
    Reggie

    A few features are completely unavailable on all-java, most notably capture. Other than that, it's a matter of some formats and codecs not being available (eg, MPEG-1). The list of supported media types on the JMF home page should pretty much spell it out.
    --invalidname

Maybe you are looking for

  • PARCONV phase Index could not be created ERROR

    Upgrading Solution Manger 3.2 to 7.0  Windows Nt SQL Server 2000 We are in teh PARCONV phase now and getting errors regarding tables with missing indexes. Example from PARCONV.ELG file: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Unable to edit documents in InDesign CS4

    Hello, A work colleague has recently changed their laptop and installed CS4 - since the getting new computer he has been unable to edit documents (which are fine on my machine). He can select objects and reposition on the screen, but can't edit/delet

  • Can I buy TV episodes on just the Apple TV?

    I am sure this has come up at least a million times before but this is new territory for me. We usually use the Apple TV to rent movies. We do not stream or sync anything. Now my wife wants to purchase some TV series. Can I purchase them on the Apple

  • Configuring cronie for mailing output [solved]

    Hi, I am having a hard time setting up cronie for mailing output. Jump to the last sentence for the actual question. From man 8 cron, I read that the -m option "allows you to specify a shell command to use for sending Cron mail output instead of usin

  • Contract N-Step approval workflow - WS14000148

    Hi, I have activated the workflow template WS14000148 and implemented the badi definition 'BBP_WFL_APPROV_BADI' to populate the agents for routing the workflow notification. When i create a contract, the workitem is going to the corresponding manager