Java in Database
There is a case wherein we embedded the Client Program written in Java Swings inside the DB and invoke the main class. The problem is that even if it is invoked from the client machine, the relevant forms and all open up in the server machine. We would like to know how the same can be invoke locally on the client machine, thereby creating the JVM locally on the client machine and loading the relevant forms on the client machine.
All great ideas, but unfortunately those would require technology not available.
Launching a JVM on the client machine would need to be a function of an application already be running on the client side. DBIsql does not perform that action for you and it is not clear what client program you might have envisioned that would need to do this function. Once you can arrange to have a JVM running you would then need to have/add logic to access the classes/jars as serialized data and launch those on the client side JVM.
That might even need a modified JVM to accomplish.
Needless to say this is not the way most customers would use this feature.
The Java in the database feature allows you to re-use Java components where it makes sense but it is not a full 3-tier enviroment. Classes that perform GUI functions rarely make sense to be run this way. Abstracting the parts that do the business logic and data access into separate classes would produce the kind of objects might be used in this Java environment.
Many applications forgo the monolithic Java program approach and switch to a Web Client model and partion the applicaiton to run the application logic components in a J2EE server like JBoss or Apache+Tomcat enviornment. Others have gone the Citrix or some flavour of J2EE server, in the middle tier. I don't know if either of those more closely match your purposes. Of course, the database and some java classes will typically operate behind those approaches as well.
HTH
Similar Messages
-
Java dictionary database table in web dynpro application
Hi,
I want to access java dictionary database table in my web dynpro application in java.
Right now I have created one java dictionary DC.
and in that Dc i have created two database table .
Now I want to use this table in my web dynpro application.
Can anyone help me.You can use the Dictionary Projects to create tables in Database. You must use codes to access these database tables that is created using Dictionary projects.
You have to use the DataSource in order to get connection ; Use Visual Administrator to see the data source name.
You can use the following code to access the database table.
ResultSet result = null;
try
InitialContext initialcontext = new InitialContext();
DataSource datasource = (DataSource)initialcontext.lookup("jdbc/<DataSourceName>");
Connection connection = datasource.getConnection();
Statement statement = connection.createStatement();
result = statement.executeQuery( <Query>);
connection.close();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Regards
Vinod -
How to connect java with database without any dsn.
is there any way to connect java with database with out creating any dsn..like we do in ado in vb by providing provider.
Sure use a type 4 driver. No DSN.
-
How to find my submitted bug report in Java bug database
I just submitted a bug report in Java bug database and it told me that the submission is successful without its bug ID and no email notification is received from Oracle.
And I cannot find the bug in bug database with the title I submitted.
The bug's product/category is Java Plug-in in JRE7
So how could I get the bug status? Will it be fixed and how is it going on?I just submitted a bug report in Java bug database and it told me that the submission is successful without its bug ID and no email notification is received from Oracle.Last time I did that it also said it wouldn't appear straight away. They have to qualify bugs you know.
And I cannot find the bug in bug database with the title I submitted.How long ago?
So how could I get the bug status?Wait till it turns up?
Will it be fixed and how is it going on?How would anyone on this forum know? -
Java Embedded Database Recommendation
Does anyone have a recommendation for a Java embedded database solution? I have been using Borland's JDatastore for a while and I have become frustrated by some of its' bugs. Has anyone had a better experience with some of the other Java embedded databases out there - for example, InstantDB or Pointbase? Or are all of these products at about the same level of maturity and reliability?
Thanks.Take a look at our project here; http://www.mckoi.com/database/
It's an open source embeddable SQL database in Java. -
Java Swing Database Components
Heloo guys!
Anyone knows where to download Java Swing Database Components??http://www.jars.com/utilities/libraries/resource.php/28653
http://sourceforge.net/projects/jsdbc/
create your own rather. -
Re: Upgrading java for database
Hi,
I have upgraded my java for applications using
Using J2SE Version 6 with Oracle E-Business Suite 11i (Doc ID 401561.1) .
My java for database is still old , In one of the post i have seen that to upgrade java for database same above Doc should be used .
But there is no procedure mentioned for this , should the java be upgraded for database or the old version should be continued ?
Regards .Hi all
Got the Doc ans sol
Using Latest Java 6.0 Update With Oracle E-Business Suite Release 12 (Doc ID 455492.1)
Section 3
Section 3: Upgrading to Latest JRE 6.0 on Database Tier Node -
Customer Order Records in Java using dataBase
hi can u help me on how to make a Customer Order Records in Java using DataBase?
may i know the code in the JCreator?
or the Syntaxfor this program..
Hope you will help me,,thanks a lot,,Well, being that you're offering the maximum dukes, and you're cute, just sit back and relax while one of us does your homework for you. It's going to be a little difficult though, we need to don our mindreading caps too to figure out the exact requirements since you didn't post it.
-
Any Guidance on Java-to-Database Programming?
Hello, 2-15-2003
As a beginner in Java, I have succeeded, with
the help of this Forum, some books, tutorial,
SUN Web Site, etc. -- to write fairly sophisti-
cated Java programs. I have used/setup CLASSES,
Packages, access to System Commands, etc. Basically
what I can do in REXX, PL/1, etc. I can now do
in Java.
My next task for myself is to do a Java to
database system connect, database READ, WRITE,
Query, etc. I am planning on Oracle & DB2,
because those are the most common Databases that
you see in the market,... therefore, demands for
skills.
QUESTION: Any guidance any body can give me?
Where do I start. What should I
read up on ? What's the class
package in Java to do such database
navigation/manipulation work?
MY THOUGHTS ON JAVA:
1. Not bad. A sophisticated language.
2. I like the idea of packages: AWT, etc.
3. A bit slow compare to other 3rd gen. languages
such as PL/1, REXX.
4. Java is a definite MUST KNOW, because of
the opportunity for work out there.
5. Java and Object Oriented stuff is here to
stay, because of the many advantages.
6. Java is not a difficult language. It is
very very powerful, allows you to do very
complex systems, engaging in ALL modern
applications, ex. Web, Graphics, High Math.
Thanks every one,... and I am still a beginner.
-- gte99te , New York.http://java.sun.com/docs/books/tutorial/jdbc/index.html
-
Deployment issues-java desktop database application
hello,
i'm vasant...recently visited an online tutorial for creating java desktop database application
here is the URL [http://www.netbeans.org/kb/docs/java/gui-db.html#running-outside-IDE] ...
everything works fine...when building and executing the application from within the NetBeans IDE..6.7
but as instructed in that tutorial...when I tried to run the .jar file after exiting the netbeans IDE, it didnt run...
infact direction has been given in that tutorial for this in the last section....which says that i've to start Java DB from outside the Netbeans IDE...that's where difficulty arises....
i've no idea how to start Java DB manually...
i'd really appreciate if nybody der could...help me out plz
thanxspring_patel wrote:
i really appreciate you trying to solve my problem..
but i think...my estion is fairly simple and straight forward...and i've provided every detail of my problem(if uv'e read my opening post of this thread)....
and as far as that link goes...i've already checked it b4 u guys mentioned it... as it is provided right there in the tutorial i've provided link of...
and i've tried my options b4 making use of this forum...and i didnt find a solution that's why i'm taking ur help..
nevertheless...i repeat my question...
there's a tutorial at this link...[http://www.netbeans.org/kb/docs/java/gui-db.html]...in it is described how to create a java desktop database applicaiton...
at the end of the tuorial there is a section called: "Building and Deploying the Application"
in that section they have instructed to exit netbeans IDE and try and run the application outside it...which is not happening
the reason they say is that i've to start Java DB from outside of the IDE...that is wat my problem is ..
i dont know how to start Java DB from outside the Netbeans ide...You are not telling us anything.
If I tell you "my automobile doesn't work" how do you know what is wrong. Instead I need to tell you one of the following.
1. The engine didn't start.
2. The wheel fell off.
3. The engine caught fire.
4. When I went to the driveway the car wasn't even there.
When you "run" something then something happens. When I run notepad from a console window if notepad is not in the path then I will get an error about command not found. if it is in the path then the command executes and notepad pops up. Even if I don't see notepad pop up I know that the command seemed to execute from the command window.
The above are examples of describing what you did and what did happen. In detail.
"It doesn't work" provides neither detail about how you ran it nor what did happen when you did attempt to run it. -
Simple java/mysql database application question about triggers
I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
thanks for your responselduren wrote:
I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
It doesn't have anything to do with java at that point.
When you execute, for example, an insert statement, then the database executes that statement. The database (not java, not the driver) decides with that statement is complete. Control returns to java when the database decides that execution is complete.
And except for tricks that one might do (or attempt to do) via SQL or triggers then when the statement execution finishes then everthing has completed running. -
Help needed to converstae xml with java and database
I want to make use of xml to read soem data from database and then use that material in java to display or manipulate that data and again feed back it into database through xml.
why using XML? how about JDBC?
-
Populate Flex Tree from Java Code (Database)
Hi
Can someone please help me? I'm very new to using flex. I'm
basically trying to create a tree that is populated from data in my
database. I am using hibernate to fetch that data.
The plan is to basically create the tree in Java code (since
I don't want any processing done on the client PC) and then pass
this to the flex tree (or an actionscript data structure that is
compatible as the tree datasource)
I am creating the java tree using DocumentImpl. Is this
correct? What class would work?
Element e = null;
Node n = null;
Document xmldoc= new DocumentImpl();
Element root = xmldoc.createElement("USERS");quote:
Originally posted by:
ntsiii
Stop running and get a map (read the documents)
This is hardly a useful comment and must discourage new users
from asking questions. If you think the documentation relating to
the use of the tree control is straightforward then I beg to
differ.
If you are aware of a clear example of how to use the data
tree with a php backend returning a remote data object please
enlighten me. Meanwhile I continue my search but not within the
livedocs.
One site I have found that may be of use is
http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html
Not everyone is an expert. -
Java feat database(MySql)
I am trying to write a single-client/server application which maintains a database. The client app sends request to server which executes the request and returns the result to the client. The GUI on the client side must be able manipulate the database by: creating tables, load tables with the serialized files, insert data, delete data, manipulate Booleans and do calculations.
Question 1: In my class how do I initialize the Boolean? Referring to the text book (JAVA Sixth Edition) Chapter 14, I created the class and a different class with the same info except for the import of the Serializable class/(function) in a package that I created. Both classes are in there.
Problem 1: How do I declare the default constructor of a Boolean? For numeric and string value it seems easy e.g.:
public class Serializable()
this(0," "," ",0.0);
But for a Boolean?
public class Serializable()
this(" "," ", ?); - >string, string, Boolean
I have made compensation for handling a ClassNotFoundException, but that error message is about all it gives me. Where did I go wrong????
Problem 2:How do I code the other functionalities? The book only talks about viewing information from the database, nothing about creating and loading tables
let alone insert and delete.
It does talk about a script that is on the CD to create the tables in MySql, but I don't have the CD. Can I use such a script in my client app?
Are there some examples of such applications on the net or are there scripts I can refer to, that might help me?
Please help :-{
Thanx
SgtThis is what my record is suppose to look like:
package DvdPackage;
import java.io.Serializable;
public class Movies implements Serializable
private String title;
private String category;
private boolean newRelease;
private boolean availableForRent;
public Movies()
this("","",true,true);
public Movies(String Title, String Cat, boolean New, boolean Avail)
setTitle(Title);
setCategory(Cat);
setRelease(New);
setAvailable(Avail);
// set methods
public void setTitle(String Title)
title = Title;
public void setCategory(String Cat)
category = Cat;
public void setRelease(boolean New)
newRelease = New;
public void setAvailable(boolean Avail)
availableForRent = Avail;
//get methods
public String getTitle()
return title;
public String getCat()
return category;
//checks if the movie is a new release
public boolean getNew()
return newRelease;
//checks if the movie is available
public boolean getAvail()
return availableForRent;
The reading a serialized class looks like this:
import java.io.*;
import DvdPackage.Movies;
public class ReadingFiles
private ObjectInputStream input;
public void openFile()
try
input = new ObjectInputStream(new FileInputStream("Movies.ser"));
catch(IOException ioException)
System.err.println("Error opening the files.");
public void readRecords()
Movies record;
//System.out.printf("%-40%-40%-10s%10\n", "Title", "Category","New Release","Available");
try
while(true)
record = (Movies) input.readObject();
System.out.printf("%-20%-20%-1s%1\n",
record.getTitle(),
record.getCat(),
record.getNew(),
record.getAvail());
catch(EOFException eofException)
return;
catch(ClassNotFoundException classNotFound)
System.out.println("Unable to create object.");
catch(IOException ioException)
System.out.println("Error during the read of the Movies file!!!!");
public void closeFile()
try
if(input != null)
input.close();
catch(IOException ioException)
System.err.println("Error closing movie File!!!!");
System.exit(1);
The code runs with no errors, but it stops at the "ClassNotFound" handler.
What is wrong with my code? -
Java, access database( mdb) and java.sql.date
I having a problem querying my access database with user specified date the code is as follows
//get results of income from database with respectto dates
//so u first create the sql.date instances
private void getResults(){
String text1=from.getText();//text input is like this 01-01-2005
String text2=to.getText();
Date d1=new Date(Integer.parseInt(text1.substring(6)),Integer.parseInt(text1.substring(3,5)),Integer.parseInt(text1.substring(0,2)));
JOptionPane.showMessageDialog(this,d1.toString());//traces date with 1900 added to year and 1 added to month
try{
//custom class DataSource used to connect to database
Connection conn=DataSource.getConnection("RealFotoInc");
PreparedStatement ps=conn.prepareStatement("select * from Members where date=?");
ps.setDate(1,d1);
ResultSet rs=ps.executeQuery();
while(rs.next()){
System.out.println("going");
System.out.println("trial"+rs.getString(3));
}catch(Exception se){
JOptionPane.showMessageDialog(this,se);
}and it prints out nothing I dont know what is wrongWhoever put that comment in there about "1900" and so on knew what had to be done. That "Date" class must be "java.sql.Date"; go and read the API documentation of that constructor you are using there. Then adjust the parameters you are passing to it accordingly.
-
Help!! How To Connect Java & PostgreSQL Database
I'm final year student in comp sc. I'm doing java in my thesis.
How to get/read data from postgresql using java?
My thesis is "2 Dimensional Graph Statistics Online Viewing Using Java Applet". So i need a mechanism how to read data from postgresql database using java programming. Please Help!!Hi,
getting started you need some basics on JDBC.
Have a look at the tutorials, or look at this site (its german):
http://www.furchur.de/de/informatik/laborberichte2.htm#dbswt
Have a look at the java.sql package.
First you need to build up a connection using
java.sql.DriverManager.getConnection(...)
The parameter for the PostgreSQL you must look somewhere.
After you have a connection you can use Statements and PreparedStatements to get and set data in the database.
At the end, make sure, the connection will be closed, otherwise data can be lost.
Hope that will help you a little bit
Maybe you are looking for
-
I have 3 email accounts and on 2 of them there is the "Delete Account" red button at the bottom, but for one of them it is not an option. This particular account that I am trying to remove was installed using the iOS setup tool from GoDaddy.com, whic
-
Hello everyone, I'm in need of some major help with my IPhone 4S. I'm very confused and frusterated! My friend had originally purchased two IPhone 4S phones about two years ago. I know this because he decided to give me his second IPhone 4S that w
-
W530 w/ Series 3 Dock - Driving Three 4K Monitors
Hey All, Interesting question for you... My normal monitor configuration on my desktop machine is 3 Monitors in landscape + 1 in portrait. I am considering upgrading my 3 landscape monitors to either 2560x1440 screens or 4k. I use a W530 with a Serie
-
Import of AIC MOV - FCE cuts off the last 10 seconds
I created the mov with Quicktime screen recorder and then had to convert it in MpegStreamclip. FCE plays it just fine but it simply cuts it with 10 seconds left. Anyone know why this may be happening? or how I can make FCE see the whole file? Yes
-
CS6 Zoom tool refuses to behave nicely...
How do I get the zoom tool in CS6 Illustrator to behave normally (like all older versions) and let me specify what areas i want to zoom in on and at what percentage? It just jumps to SOME of the predefined percentages (not all of them work it seems..