What Classes do you use for developing Database Applications

Hi ! (sorry for my bad english)
I develop now an application for production planning and I use an informix database-server. I have no problems with the database an the connection. I,m a database expert, but I,m a newcommer in java. What classes do you use to develop a database application ? (specially Table Handling) I tried it with JTable and AbstractTableModel. Are there better possibilities ?
JdbTable OR
JTable with DBTableModel OR
JTable with DBTableModel and DataSet
I know that this is a big question, but some little Informations can help me. (I develop with JBuilder Proffessional)
Thank you for your help.
Wolfgang

No - the classes you have described (AbstractTableModel etc) are Swing classes - that is, they are Models in the MVC GUI architecture. Database-related stuff (SQL at any rate) is contained in the packages java.sql and javax.sql - The latter is part of the Enterprise addition. You would also need to purchase a database driver (or use the sun one, which is something like com.sun.odbc.jdbc.Driver or whatever). The driver supplies you with connections to the database (java.sql.Connection).
Alternatively, you may be deploying code in a J2EE AppServer (eg. WebLogic, WebSphere etc) in which case you can use the JNDI to get a javax.sql.DataSource object (by setting one up in the AppServer and doing a lookup on it) and use this to get database Connections.
  Class c = Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
  SybDriver sybDriver = (SybDriver) c.newInstance();
  java.sql.DriverManager.registerDriver((Driver) sybDriver);
  //then use Driver object to get hold of a Connection
  //or alternatively using DataSources
  InitialContext ctx = new InitialContext();
  DataSource ds = (DataSource) ctx.lookup("jdbc/MyDriver");
  Connection conn = null;
  try{
    Connection conn = ds.getConnection("login", "password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select * from MY_TABLE");
    while (rs.next()) {
      //columns are enumerated 1...n
      String s = rs.getString(1);
      //or can get by Col Name
      String str = rs.getString("name_col");
  } finally {
    conn.close();
  }Anyway, I hope this helps - you'll probably need to get a book on it (Java Enterprise by O'Reilly is a good one)

Similar Messages

  • What strategy do you use for development EJB-JSP ?

    Hi all,
    I'd like to share opinion about development phase.
    In particular what is the best strategy for development
    of JSP-EJB applications?
    1. You keep JSP files unpacked under your Context and copy EJB interfaces in the /classes directory
    Pro: quick web development, no packing/unpacking of files
    Contros: proliferation of EJB interfaces both on Web side and on the EJB side
    2. keep JSP files and EJB interfaces into an .ear file and drop the ear file in the deploy directory for every modification.
    Pro: compact distribution of application, no need to keep duplicate copies of EJB interfaces
    Contros: packing/unpacking of ear/war files needed for every single modification of jsp/ejb
    What do you think?
    Thanks
    Francesco

    I certainly package the stuff in an EAR file - this EAR file contains the WAR file with my JSP/Servlet/Struts code & the required EJB interfaces. As well as the WAR file, the EAR file contains a JAR for the bean implementation. I want to correctly split this up in case I end up using a seperate EJB and Servlet container - my current seperation doesn't really allow for this at the moment. I guess this would involve building:
    1.) app-common.jar - Bean interfaces, utils, data transfer classes etc
    2.) webapp.war - Front end client code including JSP's, Servlets, Struts code etc
    3.) ejb.jar - The bean implementation
    Many containers only support deployment using an EAR file - supporting deployment of unpacked structures is not a requirement in the J2EE spec and so it will depend on whether or not. JBoss 3.0 hot deployment is fairly good so getting ant to stick my EAR file in the deploy directory after each build is normally not much bother (only the occasional full restart)

  • What O/S do you use for Development?

    There appears to be many issues with Windows XP as a development platform, not only for Netweaver, but for any application which requires a large amount of contiguous memory.  I'm not prepared to recommend to our group that we use XP for development, due to the re-basing requirements of the various DLL's that fracture the memory address space, thereby preventing large-scale allocations of memory to the J2E engine.  There are others reasons for not re-basing DLL's, namely the departure from company-installed code, issues with O/S updates, support issues, etc.
    Linux, however, does not have these issues, as it properly handles memory.
    Out of curiosity, what environments are people using for development?  What O/S?  Are you hosting a local J2EE?
    Granted, if you're not hosting a local J2EE then these memory issues do not assert themselves, but I want the ability to run Netweaver locally without having performace suck. (ie: 1GB of memory or more allocated to the engine).
    Comments?

    Hi Ken,
    > How much memory are you allocating to the JVM?
    To be as precise as possible:
    -Xms512M
    -XX:SoftRefLRUPolicyMSPerMB=1
    -XX:+DisableExplicitGC
    -XX:MaxPermSize=192M
    -XX:PermSize=192M
    -XX:MaxNewSize=96M
    -XX:NewSize=96M
    -XX:SurvivorRatio=2
    -XX:TargetSurvivorRatio=90
    -Dmemory.manager=512M
    -Xmx512M
    Hope it helps. Think of it, it's for 6.20! 6.40 definitely consumes more memory.
    The values from this morning, when I had started the server, didn't really change: Now it's 339MB, virtually 759MB.
    > How does the EP perform
    > in these tight memory constraints?
    Quite good
    > And, why are you running the EP locally?
    > Is this just for testing your components in the EP?
    Primarily for developing EP applications (what's my main profession).
    > EP is really not required for development
    ... if you're not developing against the EP ...
    > that you only require a license for the J2E engine
    Almost. You'll have a central licence, but a portal specific one.
    > what's a developer to do when the 120 days is up?
    > Is SAP planning on a 'supported' release
    > for XP for developers?
    Good question, ask SAP   As said, when I'll switch locally to EP6 NW04 (instead of SP2), I'll do my best to do so without switching the underlying OS...
    Hope it helps
    Detlev

  • What tools do you use for automating builds?

    Hi all Build Engineers,
    what systems do you use for automating builds - do you use your own tools, or some opensource project?
    If it is something public, which one it is, and what were the reasons to chose it?
    We are thinking about using the Hudson system (http://hudson.dev.java.net/) for our developers, but would like to hear from other RE groups about their experiences too.
    Thanks,
    Karel

    Tinderbox is another build monitoring tool. It does not show detailed steps of a build cycle. It only shows the final result : success or failed. But it can display build output for multiple platforms on the same page.
    This is how the tinderbox build grid will look --> http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey
    Detail Info -->
    http://www.mozilla.org/tinderbox.html
    Tinderbox can be connected to Bonsai -->
    It is a tool that shows you who checked in what, lets you perform queries on the contents of a CVS archive; get a list of checkins, see what checkins have been made by a whom, or on a given CVS branch, or in a particular time period.
    Detail Info -->
    http://www.mozilla.org/bonsai.html

  • I want to develop iphone apps. But I am from Costa Rica, I have seen that there are developers who sell from my country here. I wonder what method of payment used for developer profits, for example Paypal?

    I want to develop iphone apps. But I am from Costa Rica, I have seen that there are developers who sell from my country here. I wonder what method of payment used for developer profits, for example Paypal?
    If so could make money there, and a local bank, has service PayPal.

    Apple does not pay developers via PayPal. All payments are made directly to your bank via electronic funds transfer.
    For more information on Apple's program for distributing your apps, see:
    https://developer.apple.com/appstore/index.html
    Regards.

  • What listener do you use for adding text to JTextField?

    what listener do you use for adding text to JTextField?
    I have a component which adds some text to my JTextField, and I want to pick up this event. I have tried ActionListener with no effect.
    cheers,
    Olly

    jtextField.getDocument().addDocumentListener();
    The DocumentListener implements:
    changeUpdate() insertUpdate() removeUpdate().
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/event/DocumentListener.html

  • What headphones are you using for your play

    Im just curious to find what headphones people are using for there mp3 players, i am using some JVC gummy's there not expenci've at about ?6.99 and they come in about 5 colours which is nice if you have a player like a zen micro, n200 etc...... If you want to know where to get them i got them from dixons, there pretty good Message Edited by sababas on 08-24-2005 0:47 PM

    I use Koss SparkPlugs on my N200. Cost about ?5, very comfortable and good sound quality and volume.
    PB

  • HT4341 from the apple travel adapter kit what adapter do you use for thailand

    from the apple travel adapter kit what adapter do i use for thailand

    I've used Apple a few times in the past for 4x6s (with iPhoto) and was really happy with the quality. There are other things about the service that frustrate me though. The shipping time was all over the place. Sometimes it would only take a week or two, other times over a month. Unfortunately, I can't seem to get Order Prints to work for iPhoto or Aperture anymore, so I'm looking for an alternative as well. Something that has an Aperture plug-in would be extra cool, if that exists...
    In the meantime, I've just been printing at Wal-Mart or the local camera shop (when they have a sale). The quality isn't as good -- less definition in the prints -- but the order is always ready to pick-up within a couple of hours at the most (which beats getting no prints at all through Apple's service). And the nice thing is, the pictures are printed and boxed in the order they're uploaded. None of this "we print the smallest files first, as they download" silliness from Apple that causes you to have to sort all of your photos again while referencing the images on your computer if you want to put them in chronological order. Does Apple really expect me to believe their printers are just waiting to print my order the split second each image is downloaded? There's no staging process involved whatsoever? Give me a break. I love Apple, but things like this are so backwards from the whole "it just works" mantra that they love to use. Sorry for the rant! I'm a little frustrated with Apple's printing services at the moment (as I'm sure you can tell).
    Anyway, you can always give your local Wal-mart a shot. Just do a small order and see how it turns out.
    Doug

  • [CS5] what hw configuration do you use for development?

    Greetings to all,
    could anyone of you share the hw configuration they use (processor/memory/OS) for developing ID CS5 plugins?
    My E8400@3GHz with 32bit WVista and 2GB is toooo slow to provide seamless development debugging as it can take almost 5!!!! minutes to start CS5 Debug.
    Do you also have tips for Mac system I should get (still stuck with 5 years old Tiger....)
    Thanks for any input!
    Adam

    This summer I allowed me an almost maxed out MacBook Pro 15" (512 GB Apple/Samsung SSD, 8GB Ram, 2,66 Ghz Core i7).
    Little cheat: second start with the same plugin configuration, so the defaults and workspace are not rebuilt.
    InDesign CS5 startup time is 9 seconds (Debug) or slightly below 4 seconds (Release) including all default panels shown.
    For comparison, the values double with a MacBook Air (128 GB SSD, 2GB, 1,4 GHz Core 2 Duo), which needs 19 seconds (Debug) and 7 seconds (Release).
    With the 15", launch&debug from XCode, after compilation, takes 14 seconds (Debug). Not too bad considering that gdb loads many symbols. My estimate is you need 1 GB RAM extra to make the debugger happy. The really impressive point though is how XCode utilizes the 4 cores to fly thru the sources in parallel.
    Too bad that my focus at the moment is a 99% scripting project where speed considerations are mostly neglected.
    Dirk

  • What Keyboard Did You Use For Bootcamp

    I was wonder which keyboard you used to install bootcamp. Whenever I install bootcamp it says to press enter but none of my 3 keyboards work, one of which is a apple keyboard.(not the new slim)

    [vEX] wrote:
    con wrote:I use Xmodmap to get the keys to work...then just assign them actions throuhg the global shortcuts in applications
    If youre not gettign any codes, dmesg or xev, turn of the computer switch to the PS/2 port youre using USB to connect the keyboard, USB hid driver hasnt got the functionality to give those extra keys scancodes and the devs dont seem willing to do anything about it...
    Follow the wiki hotkyes instructions and you cant go wrong, someone posted link to them earlier.
    Not wanting to sound rude, but if you had even bothered to read the thread you would have seen that the keys are working fine with xbindkeys, it's the process of autostarting xbindkeys with openbox that doesn't work.
    However, I've now started using the built in keybind function in openbox, though for some reason I can't execute mpc commands (ie: mpc stop), it just won't work. Instead I have to use Sonata (ie: sonata stop), could the reason be that mpc outputs info while Sonata does not when you use those commands?
    EDIT: It wasn't, I added the --no-status switch but it still won't work with mpc.
    Actually i read every post in this thread before posting, sorry if came of sounding mean (sv:elak) or something. Thought you just wanted to know what apps ppl were using to get multimedia keys to work (alot of ppl seem to be having problems with this), didnt realize that you wanted help. Maybe choose a better title if you dont want too confuse ppl like me. Again sorry:)

  • What Plugins do you use for PrP 5.5

    Hi,
    Wondering what plugins people are using these days in PrP 5.5?
    Thanks!
    Pete

    Magic Bullet Looks and NewBlueFX (Motion Blends - transition pack). I don't need to say anything more about Magic Bullet Looks, everyone pretty much knows by now that's a solid product.
    NewBlueFX sells a lot of plugins for effects and transitions. They are all pretty decent quality and very affordable but the Motion Blends are the only ones that I have. They're a pretty good step up from the PPro stock transitions and highly customizable. I find that when I need more pizazz in the transition, these do the job quite well.
    Used to have the Trapcode plugins (Shine, 3D Stroke, Starglow) and found lots of uses for those over the years but I never upgraded them to the new 64-bit versions when CS5 came out so those are pretty much dead on my system. I've found that After Effects still lets me do a lot of the same stuff with the built-in effects there.

  • What Plugin do you use for the Mastertrack

    I am curious to know what plugin people use for the mastertrack, given that there is only one open slot .
    Any recomendations

    I have been using this free AU for a while now on the master track:
    Slim Slow Slider: C3 Multi Band Compressor 1.2
    http://www.apulsoft.ch/freeports/
    Scroll down the page from the above link to find the C3 Multi Band Compressor 1.2
    Features:
    Three stereo compressors.
    A master limiter.
    Flexible dividing filters(ButterWorth Filter or LinearPhaseFIR Filter).
    Sampling Rate: 44.1k, 48k, 88.2k, 96k support.
    32bit float internal precision.
    I really like it, however it does not come with a manual.

  • What software do you use for rich media ad development?

    I am a flash designer that would like to start developing rich media ads. My my full-time job, I am designing and developing banner ads but they are just normal banners with clickTags and flashing buttons.
    I would like to make them more interesting and widget like too, passing data via the database or allowing users to play and interact some how.
    How do you think is the best way for me to learn more about rich media adds? Should I try a trial membership with a place like Eyeblaster? I have heard about their plug-in for Flash that allow you to develop rich media. But is that a good system? Do you know others? What is it like. And do you normally just get into rich media ad dev because of clients or is it mainly used by ad agencies? Also, for those who use it at work or on banners, did you recommend / purchase it or was it purchased by your company? Are you a designer or developer? Does it work with AS 2.0 or AS 3.0 or both?
    Thx for reading and any replies thanks so much!
    Ms.Lee

    Most web advertising is still done with AS 2 because usually an on release event handler is required for tracking the clicks.
    A lot of rich media ads are produced by agencies. Or if a website sells banner ads, the company usually purchases the software for the in-house designer/developer to use and charges clients more for rich media ads. Companies like Eyeblaster usually charge based on the file size of the rich media ad, so they usually cost more to serve than regular old banner ads (and can take a lot longer to create) which is why they are more expensive for the client. Some clients want more than will fit or look good in a banner in which case rich media can be a good solution.

  • What classes should i use for graphics?

    I was wondering, what is the most effecient way of going about drawing 2d graphics for a game...
    use Java2D, swing, GBFrame, whatever else is out there, ect. ect.
    Your suggestions will be very much appreciated, thanks!

    Hi!
    Thank you very much for your help, I appreciate it a lot.
    While I test my server, I execute ping www.myclienthost.com -t (my client games are in other office, in the same building, but different ISP) and I don't see anything strange, so I guess network is working perfectly. However, if I use wireshark (sniffer) and I see that my system fails (server does not send acks so client disconnects) is because my acks messages are not sended for 6 o 7 seconds (it should send them every 2 or 3). It seems thread is blocked. and after 6 or 7 seconds one message with 2 or 3 acks together is sent. So, I see that the thread handler blocked for a few seconds and this is doing my server is failing. Why client handler thread on my server is blocked? One question: every 2 or 3 seconds I have a thread that uses sleep that iterates thru client handlers and takes OutputStream and send one ack message for every client handler. My question is, in client handler class I have a method called SendInfo(String whatever) which encrypts and sends through OutputStream, should I protectd this method from accesing from two threads??? as acks thread and client thread can access at the same time. Could this be the problem??
    EDIT: In my previous post I forgot to say what I found out with wireshark. Here I explain it. Sorry.
    By the way, how can I debug threads?? I would like to know if my client thread is blocked in that critical moment.
    Thanks a lot for your ideas and sorry for my English.
    Edited by: Ricardo_Ruiz_Lopez on Jan 22, 2009 7:38 AM

  • What is the best API to use for developing 3D applications is it LWJGL, JOGL or JavaFX?

    Iam an Oracle certified Java Programmer. I recently completed my Bachelor's looking to start my career in 3d game development. But I was confused what API to use. As LWJGL, JOGL or JavaFX these three things have there own advantages. Which one I need to pick as start.

    Such beautiful and professional mockups. Which quite contradicts this:
    As a newbie to JavaFX and rusty with Java in general, what is the best way to build my skeleton so that it can accomplish all 4 of my statesYou say that as if you want to believe there is some "novice" way of going about implementing such a professional looking piece of software. But you know just as well as I do that when your knowledge and skill level is low, you're only going to be able to achieve a dinky looking approximation of what you want to achieve and you're likely going to exceed whatever budget you have.
    You have to keep working on your skill level first. You have such a wonderful mockup - I would do the same with your application. Create a mockup skeleton and keep tinkering with it until it looks like something you want to achieve. Don't create a full blown version, start with a simple test version. One step at a time, the thing to focus on is to not lose your grip on it. Make sure you make it work and you understand how and why it works. When you know the how and why, you're ready to do the thing for real. You're not going to learn that in a forum I'm afraid, it is going to be a couple of weeks of effort likely because you really do have to scratch that rust off of your Java knowledge first.

Maybe you are looking for

  • Audit trail of Business Partner Views

    Hi All, A typical audit trail within SAP tracks the creation and changes of master data and transactional data. For a SAP CRM solution, we have the requirement for tracking views of business partner master data. Can this be activated in SAP CRM as st

  • 10.6.8 Freezes Mac Pro

    Guys, Hopefully someone can help! My Mac Pro has worked flawlessly for over 2 years BUT the latest 10.6.8 upgrade is creating a nightmare for me - the machine randomly hangs (not always the same program), sometimes it won't even empty the trash unles

  • 24 LED Display + New MacBookPro Clamshell Issues

    I've recently purchased a new MacBookPro 15" and a 24" LED Display. I'm using the older style bluetooth keyboard (white) and mighty mouse on bluetooth. When I close the lid on the MacBookPro (after the display appears on the LED display), it goes to

  • ORA-0911 Errors in SQL Worksheet

    Is anyone else getting ORA-0911 errors in the Worksheet when they press F9? It is, of course, not consistent or easily repeatable, but seems to occur when I've got more than about three SQL statements in the worksheet and just typed another at the en

  • Using custom numbered lists

    I want to create section headings that looks like this: 1.0  PROJECT SCOPE    1.1 Introduction      1.1.1 Work By Others By default Pages starts numbered lists like: 1. PROJECT SCOPE How do I get pages to formatt numbered lists like I want above?  Th