Looking for an example of class to run in database

A few years back our dba took a class I had written to run outside the database and put it inside.
I maintained it from that point on, but am unsure of all the rules.
I know about using the "default" connection, and remember that he took out all the imports and think I remember the package(s) were also removed.
I also remember that when I edited it in Eclipse it always showed errors.
I've looked at the simple examples and they are not much help.
Would like to find a more general example or a set of rules (dos and donts).
Also would like to know if JDeveloper will handle the code in context, i.e. no errors.
My project is to move the data access layer of a distributed set of apps (each in it's own JVM) on to the database so that I can fully sychronize the access.
Thanks,
Jim
Edited by: user642308 on Dec 4, 2009 4:14 AM

I can help with some of the do's and don'ts but they are by no means exhaustive. One thing is is I am wondering why the imports were taken out?
The best way to do things is to compile the code into classes, then load and resolve those classes into the schema where the application will run.
You can refer the the Java Developers Guide for that.
The Java stored procedure can only access public static methods.
Do not load any jars or classes that contain methods that will call Non-JDK natives, they will fail. If the package does this then it will not run properly if called in our vm. We do not support the loading of JNI libraries because of security issues.
I don't know much about Jdeveloper but it supports development for the JVM and should handle the code correctly. It also will help with loading the classes into the database.

Similar Messages

  • I am looking for an example ...

    I am looking for an example that would show me a jsp page that retrieves/displays say 20 records at a time from a query which produced say 1000 records as a result. I mean being able to go to next page as well as previous page and display 20 records at a time.
    Thanks for any help.

    It's a little bit long, be patient...
    <%@ page language="Java" import = "java.sql.*" %>
    <jsp:useBean id="myBean" scope ="session" class="bean.DataConnectionBean" />
    <html>
    <body bgcolor="#CCFFFF">
    <%
    String sql; //SQL string
    int rowPerPage=10; //Record size of one page
    int rowTotal; //Total records
    int pageTotal; //Total pages
    int pageIndex; //Pages waiting for display, from 1
    pageIndex = Integer.parseInt( request.getParameter("page") );
    rowTotal=Integer.parseInt( request.getParameter("rowTotal") );
    String sql_2=request.getParameter("sql_2");
    String sql_1= "select " +
    "vin, " +
    "ga_no, " +
    "ga_build_date, " +
    "deliver_date, " +
    "model, " +
    "year_code, " +
    "engine_no, " +
    "initial_mileage " +
    "from vehiclemaster " +
    "where ";
    sql=sql_1+sql_2;
    myBean.connect();
    ResultSet rs=myBean.executeQuery(sql);
    pageTotal = (rowTotal+rowPerPage-1) / rowPerPage; // Get total pages
    if(pageIndex>pageTotal) pageIndex = pageTotal;
    %>
    <table border="0" cellpadding="2" cellspacing="0">
    <tr>
    <td align="left">
    <div align="left">Total <%=rowTotal%> Records</div>
    </td>
    </tr>
    </table>
    <table border="0" width="844">
    <tr bgcolor="#669966">
    <th>VIN</th>
    <th>GA#</th>
    <th>build date</th>
    <th>deliver date</th>
    <th>model</th>
    <th>model year code</th>
    <th>engine#</th>
    <th>initial mileage</th>
    </tr>
    <%
    int absolute=(pageIndex-1) * rowPerPage;
    for(int k=0; k<absolute; k++) rs.next();
    int i = 0;
    String LineColor;
    while( rs.next() && i<rowPerPage && (absolute+i)<rowTotal ){
    String col1=( ( ( col1=rs.getString(1) ) == null || rs.wasNull() ) ? "" : col1 );
    String col2=( ( ( col2=rs.getString(2) ) == null || rs.wasNull() ) ? "" : col2 );
    String col3=( ( ( col3=rs.getString(3) ) == null || rs.wasNull() ) ? "" : col3 );
    String col4=( ( ( col4=rs.getString(4) ) == null || rs.wasNull() ) ? "" : col4 );
    String col5=( ( ( col5=rs.getString(5) ) == null || rs.wasNull() ) ? "" : col5 );
    String col6=( ( ( col6=rs.getString(6) ) == null || rs.wasNull() ) ? "" : col6 );
    String col7=( ( ( col7=rs.getString(7) ) == null || rs.wasNull() ) ? "" : col7 );
    String col8=( ( ( col8=rs.getString(8) ) == null || rs.wasNull() ) ? "" : col8 );
    if (i % 2 == 0) LineColor="#DBECFD";
    else LineColor="#C6E1FD";
    %>
    <TR bgcolor="<%= LineColor %>">
    <TD><%=col1%></TD>
    <TD><%=col2%></TD>
    <TD><%=col3%></TD>
    <TD><%=col4%></TD>
    <TD><%=col5%></TD>
    <TD><%=col6%></TD>
    <TD><%=col7%></TD>
    <TD><%=col8%></TD>
    </TR>
    <%i++;
    }%>
    </table>
    <div align="center">
    <table border="0" align="left">
    <tr>
    <td align="left">
    <div align="left">Page <%=pageIndex%> / <%=pageTotal%> 
    <%if(pageIndex<pageTotal){%>
    <a href="QueryVehicleResult.jsp?sql_2=<%=sql_2%>&rowTotal=<%=rowTotal%>&page=<%=pageIndex+1%>"><img src="images/next.gif" border="0">
    </a>
    <%}%>
    <%if(pageIndex>1){%>
    <a href="QueryVehicleResult.jsp?sql_2=<%=sql_2%>&rowTotal=<%=rowTotal%>&page=<%=pageIndex-1%>"><img src="images/prev.gif" border="0">
    </a>
    <%}%>
    </div>
    </td>
    </tr>
    </table>
    </div>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </body>
    </html>
    <%
    rs.close();
    myBean.close();
    %>

  • Looking for a stopwatch app that can run on iPod Touch 2nd Gen (using ios 4.2.1), do any exist?

    Looking for a stopwatch app that can run on iPod Touch 2nd Gen (using ios 4.2.1), do any exist?

    To more easily find compatible apps:
    iOSSearch - search the iTunes store for compatible apps.
    Apple Club - filter apps by iOS version.
    Starting when iOS 7 was released, Apple now allows downloading the last compatible version of some apps (iOS 4.2.1 and later only)
    App Store: Downloading Older Versions of Apps on iOS - Apple Club
    App Store: Install the latest compatible version of an app
    You first have to download the non-compatible version on your computer. Then when you try to purchase the version on your iPod you will be offered a compatible version if one exists.

  • Looking for an example from app gallery that uses WAAD for identity

    I'm looking for an example from the app gallery (http://azure.microsoft.com/en-us/gallery/active-directory/) that uses WAAD for identity. I need one the show our business what the process would look like for an organization signing up for a SaaS offering
    via the App Gallery. I know all the Microsoft applications use WAAD but I was hoping to find a third-party example.  What I mean is an app where all tenant and user identity is done using WAAD as opposed to federated identity.

    I doubt that what you are looking for exists yet.
    Cheers,
    Markus
    Markus Vilcinskas, Knowledge Engineer, Microsoft Corporation

  • I work in a High School and I am looking for a new library system that runs on the mac and is not windows based, can anyone recommend anything?

    I work in a High School and I am looking for a new library system that runs on the mac and is not windows based, can anyone recommend anything?

    That's a very broad question and difficult to answer without knowing more about you requirements.
    Try starting on this page Category review: library management software for the Mac |Part I  and part II  to get a starting point.
    regards

  • Looking for a examples of a podcast from a law enforcement agency

    Hi, I am looking for podcast examples from a law enforcement agency. Any suggestions?

    I doubt you'll find any through iTunes U which is pretty much all educational institutions, though someone might have posted something from a sociology and criminology program. You might try browsing the iTunes Store podcasts section:
    Browse -> Podcasts -> Government & Organizations
    I didn't go through the entire list, but I did see a podcast from the Center on Law and Security and one from Cop Talk Radio, so there might be podcasts of interest.
    Regards.

  • Looking for older version of Itunes to run on Pentium(R) 4 CPU 2.6GHZ Windows XP

    looking for older version of iTunes to run on Pentium(R) 4 CPU 2.6GHZ Windows XP

    ? Please read my original post again. Maybe how I said it was confusing but that is exactly how I checked it... in VISTA. Exactly the way the link you gave me described.
    You do understand the message I am getting says: *itunes.exe has been set to run in compatibility mode for older version of windows. For best results, turn off compatibility mode for itunes before you open it.* I am interpreting this to mean that compatibility is set for something OTHER then VISTA since it it saying "for and older version of Windows".
    When you tell me to "Check the compatibility mode in Vista not iTunes" what the heck do you even mean? How do you check compatibility in iTunes?
    Thanks for trying to help, but not sure you read my post as I intended. I have seen one other post that mentioned the same problem, but that post never got a response that was helpful.
    Thanks for trying. Later !
    p.s. I still need help from someone.

  • I'm looking for an example of Session Time Warning dialog

    I'm looking for an example of a Session Timeout warning dialog to warn a user that their session is about to expire.  I'd really like it to have the option to extend the session or logout.
    I have a user submitted Webapp with several fields and an image upload.  The image upload is for a copy of a professional state license.  When the user gets to this field in the form, they realize that they have to scan their form first.  They leave the Webapp Input form open, get their image uploaded finally, submit the form, then they get a message that they are no longer logged in. Any help would be greatly appreciated :)

    If your doing work on the front end like this and you feel the form is to long or things like file upload takes too long then build a multi-step form process and have the image as one of the latter steps so you can start saving the data.

  • Looking for an example for using CreateViewObject()

    ADF 11g
    Hello
    In order to have a temporary vo for some internal processing
    I'm looking for an example for using CreateViewObject()
    If I understand things correctly it is used as follows :
    ViewObject vo = am.createViewObject("MyVO", "package1.DeptView");
    vo.executeQuery()
    // do my processing here
    vo.remove()Is this correct ?
    Regards
    Paul

    Hi Paul,
    Yes it is correct, you can find the sample code in [this post|http://radio.weblogs.com/0118231/stories/2003/01/17/usingViewObjectsInEntityObjectsForAnEfficientExistenceCheck.html] by steve muench(Search with createViewObject for quick referencing)
    Sireesha

  • I am looking for labview examples related to ECG

    Hi, everyone!
    I need your help.
    I am looking for labviews examples, which are related
    to ECG for my thesis .
    I wait for your answer.
    thanks in advance

    Burcu;
    I am not sure what type of examples are you looking, so this is a start:
    Searching at the LabVIEW Discussion forum I found:
    Example
    calculate heart rate from ECG
    how to design a suitable vi to acquire ECG waveform?
    Doing a search with Google:
    LabView Exercise to model and analysis ECG/EKG data
    EE 206 MINI-PROJECT I CARDIAC MONITOR VI
    Searching an NI.com:
    PC-Based ECG Monitoring and Analysis Using BioBench (LabVIEW VIs at bottom - not sure if link is dead)
    Regards;
    Enrique Vargas
    www.visecurity.com
    www.vartortech.com

  • Looking for an example VI that shows how to trigger an event in a VI from a subvi based on a value.

    I am looking for an example VI that uses a typical event structure for the GUI, but also has an event that will trigger based on a boolean value changing in a subVI to that VI.
    Thank you.

    You need to Create User Event.  Any Event structure which is registered with the event, whether it be in a subVI or otherwise can trigger the user event by using Generate User Event.
    Right-click an event structure and select Show Dynamic Event Terminal.  This is what you use to register your user (dynamic) events.
    Search for "events" in NI examples within LabVIEW.

  • Javacc and jjtree - looking for working example

    Hi all,
    I am doing a project that requires me to have an input of some java code. It is then run through a parser to tokenize it and it is then outputted into a grammar/syntax tree. My mentor has told me that I do not need to write this part (I will be doing work on tree once it is generated), and by the looks of it the parser can be 2-5k lines of code?
    Anyway, I have been looking at the examples that come with javacc and jjtree, and have those working etc. My problem is that i need to combine the two examples and i cant see anyway of doing that as the examples are vastly different. (one is a java parser the other is a 'stupid program language' tree generator, so they are using different grammars?)
    So my question is: is it possible to get a already made program that takes in java code and spits out a tree on the other end? If not what steps do i need to take to make this program :S
    Thanks!
    Scott.

    Here is a visual example
    http://www.bray.com/rollover.jpg
    The big picture would represent area "A"
    The smaller white outline box area "B"
    And area "C" would be down below
    Notice the thin white lines going from top to bottom and side
    to side represtent the crosshairs and will move around within the
    big picture as the mouse moves. Area "B" would remain centered on
    these crosshairs and would show a fullsize image of the area
    immediately around where the crosshairs are located. On a mouse
    click would change area "C" to pull up some detail text, photos,
    etc.
    The large picture will actually be a map as opposed to a pure
    photo as shown here, it was just easiest to grab a photo real quick
    for this visual example. I borrowed this photo from
    http://www.pezcyclingnews.com/
    I hope they don't mind to much.

  • Looking for Labview Examples for At-MIO-16DE-10 and AMUX-64T

    looking for examples to record:
    Load vs strain and temperature using these two.
    Also a quick guide to how to get started. I hav Labview 6i and the card and board. No experience yet.

    Greetings,
    There are a variety of documents on our website that contain information about using the AMUX-64T with an MIO device. There are also example programs that show how to acquire readings using an MIO device with the AMUX-64T. I have linked to some of better documents below as well as the AT-MIO-16DE-10 and AMUX-64T User Manuals.
    AT E Series User Manual
    http://digital.ni.com/manuals.nsf/webAdvsearch/6FB4341E8E3080F086256BD000550261?OpenDocument&vid=niwc&node=132100_US
    AMUX-64T User Manual
    http://digital.ni.com/manuals.nsf/webAdvsearch/AF2CEB4411E9D3DE862567130055EAAC?OpenDocument&vid=niwc&node=132100_US
    How do I Address an AMUX-64T with an MIO Board?
    http://digital.ni.com/public.nsf/websearch/C6D362737414AD6D862562A80070E694?OpenDocument
    Taki
    ng Thermocouple Measurements Using the AMUX-64T
    http://digital.ni.com/public.nsf/websearch/9D8232DFFE50108F86256DCD005A319B?OpenDocument
    I would start with making sure the AT-MIO-16DE-10 is installed and configured correctly. You can used Measurement and Automation Explorer (MAX), which is software that is installed with NI-DAQ, to configure and test the AT-MIO-16DE-10. The AT-MIO-16DE-10 user manual goes through the installation and configuration steps for the device. Then I would attach the AMUX-64T and try to acquire signals. You can use the AMUX-64T user manual and the other linked documents to help you determine how to acquire signals when the AMUX-64T is connected to the AT-MIO-16DE-10.
    I hope this helps.
    Regards,
    Todd D.
    NI Applications Engineer

  • Looking for  beep(frequency,duration) class method

    These 2 last days, I had already posted topics about this subject , but I was certainly not very clear in the topic header. (or even about what I was really looking for).
    Is there a package somewhere I can download which contains a class with a beep method to fire a sound at a particular frequency and for a specified duration ?
    System.beep() does not allow to change the frequency.
    Thanks

    "nd on a google search gives http://www.developer.com/java/other/article.php/2226701#Complete%20Program%20Listings which containes more than you need. You will have to extract the bits you need and say thanks to Richard Baldwin.

  • Looking for istructions/examples for using winsock in Labview

    I'm looking for instructions or examples of using winsock in Labview. Looking in the NI examples I found an example using winsock UDP with Labwindows but nothing for Labview. Is the same function named different in Labview?

    Thanks for the links. Unfortunately, I am specifically looking for the ways to use WinSock (I want to collect data from a number of remote locations and the WinSock would provide me with an effective way to
    a) control the telephone number to be dialed (different for different remote stations)
    b) provide me with TCP/IP, so I could use the full power of LabVIEW seeing a remote computer as an IP address (and being able to use shared variables, web server, data socket etc. instead of me having to program all that myself)
    The other acceptable way would be to utilise a driver for a virtual network card (so I can programmically access it as TCP/IP on one side, and as a flow of bytes on the other, "virtual network cable", side). Any suggestions in this direction? By the way, it would be the best if the National Instuments would do such a virtualisation themselves. It would allow to utilise a number of solutions painlessly.

Maybe you are looking for