Michael Morris

Ranch Hand
+ Follow
since Jan 30, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
4
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Michael Morris

Charles suggestion is correct. We use BLOBs to store PDF documents but to ORACLE instead of MYSQL. I'm not sure Hibernate can handle BLOB data though I have very little experience with it. And CRUDing BLOBs usually is not as simple as INSERT, SELECT, UPDATE and DELETE. So I too would suggest plain JDBC.
10 years ago
Charles suggestion is correct. We use BLOBs to store PDF documents but to ORACLE instead of MYSQL. I'm not sure Hibernate can handle BLOB data though I have very little experience with it. And CRUDing BLOBs usually is not as simple as INSERT, SELECT, UPDATE and DELETE. So I too would suggest plain JDBC.

What are the various things one can learn from this video?



Water buffalo veal must really rock!
10 years ago

Maybe the lions were just to freaked out by the unusual behavior of the buffalo



I've heard that that sort of behavior is not unusual for water buffalo. Lions take a huge risk at attacking calves, they often wind up becoming prey for the hyenas after a large cow gores them, sort of like we saw in the video. And it is difficult to break the neck or rip out the throat of a water buffalo. Anyway it was a cool video.

Got an interesting story there for us, Uncle Mike?



Metaphorically?
10 years ago


...especially that the calf seemed to get away relatively unharmed.



Ever had a croc bite you on the ass before?

Probably will grow up to be a sociopath, stealing hay money from all the other calves, etc.
10 years ago

...would it be better to store data in files that can then be read rather than storing everything in arrays..



I doubt the arrays are what's causing the problem. My guess is you have an inefficient algorithm that is retrieving data from the arrays. File I/O for the most part is going to be much slower than anything stored on the heap and it seems somewhat strange to read the data in from a file, store it into another file and retrieve it again (if that's what you are implying).

How much heap are you using? Are the arrays multi-dimensional?

If your problem is an ineficient algorithm, you may want to consider using Maps instead of arrays, but make sure that the hashes for your keys are efficient.
10 years ago

Applets can't install native components, no matter how they're packaged.



Not true. We are doing it in a very popular web application for the company I work for. We simply jar up the native libs and load them in init. Of course the Applet is signed so we have permission to muck with the local system.

There are other ways to do it too. The particular problem here is not that you can't run native libs but there seems to be a problem with some JREs and JDIC. For example I am using Web Start to do something similar and everything works fine in the 1.5.0_08 JRE but I get the same problem mentioned with any 1.6 JRE. The tray libs work fine but the embedded browser chokes.

Take a look at this article on packaging JDIC in an Applet or Web Start application:

JDIC Application Deployment
[ May 27, 2007: Message edited by: Michael Morris ]
10 years ago
UnsatisfiedLinkErrors are usually caused when a native library has already been loaded by one ClassLoader and a different ClassLoader attempts to load it again. When we moved from WAS 4.x to 5.x we went thru a long pain period with ClassLoader issues. Try adjusting your ClassLoader policies until it works and then you should get a rough idea of which ClassLoader is causing the problem.

Mike
12 years ago
I ran across a situation at work the other day that really has me baffled. I needed to provide a short-term solution to a cross-scripting security issue. In a nutshell I have to use some JavaScript that was created by another team to request a that a work window that my application runs in be closed. I simply dropped their JS file in my root context and sourced it in a JSP (also in the root context). It worked fine on my development box, but when the EAR was deployed on WebSphere the JS file could not be resolved (got a 404). The explanation that was given to me was that we run static content from an Apache server and dynamic from WebSphere.

My question is, does the J2EE or Servlet Spec address this issue? Is it not reasonable to assume that if the WAR works on one J2EE Server (assuming all proprietary configuration is performed) that it should work on all J2EE Servers? The EAR does work on Sun's Reference Implementation that comes with the J2EE SDK.
Hi dhanu9uk,

Welcome to JavaRanch, the absolute best site on the www for Java information. We don't have many rules around here, but we do have one. Please change your display name to a first and last name to comply with the JavaRanch Naming Policy. You can change it here. Thank you for your cooperation.
13 years ago
Hi Vishal,

Welcome to JavaRanch, the absolute best site on the www for Java information. We don't have many rules around here, but we do have one. Please change your display name to a first and last name to comply with the JavaRanch Naming Policy. You can change it here. Thank you for your cooperation.
13 years ago
I am having trouble with WSAD stepping into certain classes. The classes in question are in a jar which is part of our infrastructure. Ordinarily when you step into a jar class you get the source not available window with the option to attach the source. On these classes it just steps over. The step into works fine on other jars. Does anyone have any ideas on this?
13 years ago

Originally posted by kumar kuamr:
Congrats. Good Job!!
Which version did you appear for and could you please tell me the material/books/mocks you used for the test.


The book that helped me the most was More Servlets and JavaServer Pages by Marty Hall. But the best reading you can do is of the Servlet and JSP Specs along with practical experience. I took 310-080 Servlet Spec 2.3 and JSP Spec 1.2.
13 years ago
Made 89%. The test was easier than I thought it would be, but there were quite a few hardball questions thrown in. Thanks to everyone who helped me. I would highly reccomend the JWebPlus test engine. My average scores on it were from 87-93 so it seems to be a close match to the real thing.
[ May 07, 2004: Message edited by: Michael Morris ]
13 years ago
As Gregg said, Applets run in the "sandbox" with very limited access to system resources. The fact that the file permissions are set correctly doesn't do anything for you. The easiset way to handle this is to add a permission to the plugin policy file, java.policy, which is located in the lib/security subdirectory of the plugin's main directory. If your applet's codebase is http://www.mysite.com then you would add an entry like:

That will allow unfettered access to all system resources, which may not be what you want. You can limit it to specific permissions by using different permission types for example:

That would grant read permission to just the file "/home/ganesh/test/j2sdk_nb/bin.
13 years ago