jhun kam

Greenhorn
+ Follow
since Dec 05, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jhun kam

Hmm, did you forget to close() or flush() the output stream ? Cause if you dont, your bytes could still be in your memory buffer when you close the application.
19 years ago
Thanks for the idea. I am currently trying the RMI, all the stuffs with creating an interface, remote object implementation, the server residing in registry, the stub n skeletion via rmic, and the client. Things are going quite well. But how am i supposed to do callbacks to the clients ? How can i reference them ? Could a client send their reference(this keyword) through a remote method call, and be called from the remote object ?
Okay, i'll look around. Coding in VB never crossed my mind . I think i've found what i want @ blackdown.org. But if it doesnt satisfy me, i'll code my own. Thanks.
[ July 18, 2002: Message edited by: jhun kam ]
19 years ago
Do you think i should have all the clients connect to the DB through a kind of middleware, which is a remote object ? And all the prev, next, add, delete, update operations are done through the method calls of the remote object ?
Hello ranchers !
I'm doing a simple Swing-based GUI application that can view, modify, add, delete records that are stored in a DB table. This application could be used by multiple users, and i have a problem with this:

How do i actually have the records updates or additions or deletions by one client be known by other clients that also use that application.

I'll describe a little about the GUI. It has a simple JDialog that has JTextFields, JCheckBoxes, etc that represent a Table record. The JButtons for going to the next record, going to the previous record, saving changes(update), adding, deleting record, etc are placed there too.
I use the SQL statement 'select * from TableName;' and keep all the records in a LinkedList, so i can do the prev and next easily as i dont need to have the DB server execute an SQL statement just for the next or previous record. Every updates made renders updates in my DB Table and my LinkedList representing my Table records.
All things went quite well until i realized that my current application only work with a single user in a single computer. If my application is to be used by many users, every user will maintain their own linked list that doesnt know what other users have done to the Table records.
Is it possible to have other users, that also use the same application, know what changes i've made to the records in a Table ? Please, any idea would help. Thanks.
Hi all. I just want to know if Java has any component(table or grid) that represent a Database Table. I've heard my friend who does VB that he can use a JTable-like component called 'grid' or something to show a DB table. Using that grid table, he can view, edit, add, remove the DB records, and the main point is all the details are hidden(the SQL stuffs).
If i were to do that using Java, i would have to create a JTable object with a TableModel that read a DB table, set it editable, handle every TableModelEvent in a TableModelListener, all the SQL-stuffs updating-deleting-adding any record done by a user. Quite sadly, All these stuffs are actually done with just a few codes using VB
Using Java, can i actually do easier than the stuffs i mentioned above ? If the component actually exists and free, can anybody tell me where to get it ? Thanks before.
19 years ago
I'm now at chapter 5 of Mastering EJB 2nd edition, so i'm still new in this. I have been wondering about the real world applications that make use of EJB. Can anybody give me some real examples about the fields EJB is used for ?
Can we classify EJB as one of the web services like ebXML, SOAP, etc (i have no idea what these web services are) ?
If you know the links for infos that could help me, please reply them here, okay ? Thanks alot !
Jhun
Thanks for the idea, i'm still trying here ... I'll let you know my progress.
Hi all,
Does anybody know how to specify the maximum InstanceCache for my enterprise beans in jboss.xml for JBoss-2.4.4 ? In jboss v 2.2.x, i can do it with these lines included in jboss.xml inside <jboss> tag :
<container-configurations>
<container-configuration>
<container-name>LRU Configuration</container-name>
<instance-cache>org.jboss.ejb.plugins.EntitySessionInstanceCache</instance-cache>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>2</min-capacity>
<max-capacity>2</max-capacity>
<overager-period>300</overager-period>
<max-bean-age>600</max-bean-age>
<resizer-period>400</resizer-period>
<max-cache-miss-period>60</max-cache-miss-period>
<min-cache-miss-period>1</min-cache-miss-period>
<cache-load-factor>0.75</cache-load-factor>
</cache-policy-conf>
</container-cache-conf>
</container-configuration>
</container-configurations>
But those lines above wont work in JBoss-2.4.4 while i'm deploying my ejb-jar file, with the NullPointerException(i think that the conf-tag's been changed).
Also, does anybody know where to get the complete configuration or user manual for JBoss-2.4.4 ? I'm having a nightmare finding the docs :roll:
And, after reading the docs bundled with JBoss-2.4.4, i know there's an XML editor for jboss.xml located in /bin/ named ejx.jar, but i've found none.
Thanks before !
[ May 02, 2002: Message edited by: jhun kam ]
I'm not sure where my problem fits, but because it's related to EJB, i post it here .
Here is the situation :
I want to apply for a job. The company requires the applicants to create an EJB application implementing an interface given by the company. From my application, i will get the home object, create the ejb object, and pass my data by calling the corresponding method.
Then, i need to jar them all(classes, my CV) and upload the jar-bundle to them, via their upload-servlet@their web page. My app will get executed there, and the if any runtime errors occur, they'll get printed on my browser.
Here's my problem :
One of the required method in my class was meant to read my CV which is in word-format.
jobApplication.setCurriculumVitae(byte[] buff);
The buff represents my CV.doc binary. Here comes the problem. How do i read my data from a file which is inside a jar file ?
I've tried several ways. I've tried out the plain FileInputStream which results in FileNotFoundException. I've tried out ClassLoader.getSystemResourceAsStream("CV.doc"), and it apparently returns null. Please help.
Ahhh, thank you very much, i got my problem solved now. The problem was that i didnt activate relaying ability from my SMTP server.
Now a new problem arise, it's quit amusing. I was able to deliver emails to my account at elus1v3@hotmail.com, but unable to deliver emails to my jhun_kam@yahoo.com. The code is the same. I only make a change in the recipient name(elus1v3@hotmail.com into jhun_kam@yahoo.com). The program exits gracefully, no error nor warnings, but none of the messages arrived at my yahoo account. Any ideas, please ?
19 years ago
hi, i got a 'slight' problem in sending email to my own account at yahoo.com. here's the 'error' messages:
javax.mail.SendFailedException: Sending failed; nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 Unable to relay for jhun_kam@y
ahoo.com
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at SendEmail.main(SendEmail.java:47)
can anybody tell me the reason of this ? i'm sending my email through my own SMTP server at localhost.
Thanks.
19 years ago
You should do identicat operation to jre under
program files directory.
how do i actually do that ? identicat operation to jre under program files directory ? i really dont get the idea. anyway, thanks for the help.
19 years ago
Hi guys, i got a problem about using javax.comm.
I've downloaded the Windows version of Java Commnunication API from java.sun.com.
I extracted the zip file, placed the comm.jar at c:\j2sdk1.4.0\jre\lib\ext folder, placed the javax.comm.properties at c:\j2sdk1.4.0\jre\lib folder, placed the win32com.dll at c:\j2sdk1.4.0\bin folder.
After that, i wrote a simple program to test whether i can get any serial/parallel port object from CommPortIdentifier.getPortIdentifiers();. It returns an empty enumeration, meaning that none of my ports are detected.
I tried running the BlackBox example that's also shipped with the extension API, and the message "No serial port found".
Please help;
19 years ago
Hi guys, i got a problem about using javax.comm.
I've downloaded the Windows version of Java Commnunication API from java.sun.com.
I extracted the zip file, placed the comm.jar at c:\j2sdk1.4.0\jre\lib\ext folder, placed the javax.comm.properties at c:\j2sdk1.4.0\jre\lib folder, placed the win32com.dll at c:\j2sdk1.4.0\bin folder.
After that, i wrote a simple program to test whether i can get any serial/parallel port object from CommPortIdentifier.getPortIdentifiers();. It returns an empty enumeration, meaning that none of my ports are detected.
I tried running the BlackBox example that's also shipped with the extension API, and the message "No serial port found".
Please help;
19 years ago