James Frankman

Greenhorn
+ Follow
since Jun 01, 2006
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 James Frankman

I have been interested in Android development but have had a hard time understanding the big picture. here are a few questions:

What are the major components/layers? i.e. is Android simply a Linux kernel with a custom Java Virtual Machine?

What access do you have to the base linux kernel? How is this linux kernel different than a typical desktop or server linux? Can typical linux service be installed such as CUPS?

How do you handle writing software that will potentially have to run on various hardware platforms with different components i.e. camera, bluetooth, screen size, etc.?
12 years ago
I have some javacode that I have deployed as a Stored Procedure in DB2. The java code executes fine outside of DB2 but fails inside DB2. I think the problem is that an obect instance returned by a JNDI lookup is loaded by one class loader, but the Class itself is returned by another classloader. The problem occurs on this line:



I get the following error when this is run in DB2:
java.lang.ClassCastException: org.jboss.mq.SpyQueue incompatible with org.jboss.mq.SpyQueue

So, I put the following debug statements to test my theory:

The results of these debug statements are:
The object QUEUE.SCSNumberingQueue3 classloader is COM.ibm.db2.app.classloader.DynamicClassLoader@23d023d0
Class Queue class loader is COM.ibm.db2.app.classloader.DynamicClassLoader@78ce78ce

I am not a Java expert, but from researching this problem it looks like if Class A is loaded from one classloader, and Class B is loaded from another classloader Class A and Class B are incompatible types even if they come from the same library on the classpath. Any help on this issue would be appreciated. Here are my questions:

1. Is the class cast execption due to two separate class loaders running in DB2?

2. How can I make sure that my "Queue" class definition and the object returned by my ctx.lookup are loaded by the same classloader?
13 years ago
I am looking at different web test tools for testing a new app web we are creating. I have looked at both WebTest and Selenium and both look promising, but it looks like they are not really designed for load and performance tests. The web app I need to test will be an intranet application with perhaps 200 concurrent users, so I don't need a high-end test tool.

Would either WebTest or Selenium work for simple load tests to simulate about 200 concurrent users?

I am open to any suggestions for simple load testing and performance tools. Simplicity and ease of use are the most important factors. We are a small shop so I don't want some gigantic tool that will cost a lot of time and money to leverage.
13 years ago
I have a fairly complicated program that downloads files from a remote FTP website, decrypts the files, and processes the files and sends the processed files into an digital image repository.

My questions are:

Is it generally better to move batch/scheduled processes to run inside the JBoss container, or is it better to keep processes like this outside the JBoss container?

How much and what types of scheduled batch processes should be run inside JBoss?

The approach I am considering is to use a JMS Queue to trigger the batch process and then have a scheduled job send a message to the Queue every couple hours or so. Is this a common way of scheduling and triggering batch processes in JBoss?


More background on my questions:
On our test server I opted to configure and schedule everything to run outside JBoss as a cron job. It works, but getting the classpath correct and getting the Java call to work inside CRON makes me wonder if it is better to have this run inside the JBoss container.

My understanding is that applications servers are much more that just platforms for Web apps, but 99% of application development documentation for JBoss revolves around web apps. How much and what types of scheduled batch processes should be run inside JBoss?

If I do opt for JBoss, the approach I am considering is to use a JMS Queue to trigger the batch process and then have a scheduled job send a message to the Queue every couple hours or so. Is this a common way of scheduling and triggering batch processes in JBoss?
14 years ago
Andor,

Thanks for the example. I am new at MDBs so forgive my ignorance. If the client is on a remote host, how does the client know where the server is? Is this done in the initialcontext. Is there some setting file you need to setup?
I am trying to stream a PDF to a new browser window. I can get this to work, but the strange thing that happens is that a new browser window gets opened, but instead of the PDF geting displayed inside the browser window, it is opened separately by Adobe Acrobat. So, the user is forced to close two windows, the Adobe Acrobat window and the blank Browser window. I have gone over my code but have never seen any behavior quite like this. Does anyone know what will cause a new browser window to open up, but still open Adobe Acrobat outside of the browser? Any thoughts on why this is happening?

My code is as follows:

JBoss Seam Link:


here is the heart of the Print Report Bean's method:



Here is the entire method incase you need to see the context of the snippet above.

14 years ago
JSF
I am the lead developer for a small development team. Over the past year or so we have been slowly learning java and using it on a few small projects. We plan on using it for our primary development language for most future projects. I have been considering tying the java certification levels to employee performance and bonuses. For instance, I have been thinking about giving an x% for each java certification level passed.

But before I do this I would appreciate anyone's thoughts or experiences with the certification process. Some of these questions may be covered a bit in the FAQs, but I am looking for some more feedback. Below are a few questions I have. Please comment on any of them:

1. Does the certification exam really test a programmer's "chops"? In other words, with some certifications or exams people can just memorize answers by rote and pass the test but still not really understand the core concepts. How easy would it be for someone to "fake" thier way through and exam?

2. How fast can an average programmer process through the associate, programmer and developer certifications? I was thinking about one level per year. Is this about right or am I expecting too much or little?

3. What about class room training? Obviously if the certification is worth anything, you shouldn't really be able to easily pass if you have not been through some real world projects, but is formal classroom training helpful as well? I know that Sun offers some courses. Are these worth the money and time? How effective are the online courses or the CDs?

4. Right now I am most interested in the assiciate, programmer, and developer certification's but are there other certifications worth looking at? i.e. the web certification.
I will check out your book. I was hoping that I could make this all happen polymorphically without using an "instanceof" but it looks like that is not possible. Thanks.
Do you have any examples?

How would this work for my question? What would you include in the EL expression that would make the user navigate to the person page if he clicked on a person and navigate to the organization page if he clicked on an organization.
Is there a way to have polymorphic navigation with SEAM? The problem I am having is this:

I have two classes Person and Organization that are subclasses of a superclass Client. With SEAM I perform a search where you submit a name search string and Companies and Persons with that name are returned in the query. I then display a list of persons and companies. When a user clicks a Person record I want them to go to the Person edit page. When a user clicks on an Organization I want them to go to the Organization page. The only two solutions I can think of is to:

1. Use an "instance of" inside my action to determine which page to user should go to
2. Add a method to the Client class named "getPage" and override it in the Person and Company classes. The method would return a page name or value that would be used to navigate to the Person and Client page respectively.

Are there better ways of doing this with SEAM?
Thanks, I think I understand, but I have not used the java.io library very much. I am a bit green and have mostly focused on Web and O/R stuff. I think I could figure this out on my own, but it would be helpful if you could post a snippet of code. (Perhaps I should have posted this in the beginners forum, if so, my apologies)

Thanks.
15 years ago
I have a project where a large number of tiff image files are concatenated together into one file (i.e. imagefile.img) and sent to us from another company. Accompanying this file is an index that give the "Image Starting Location" and the "Image length" in bytes is listed sequentially in a text file (i.e. ImageIndex.txt). For instance, two entries in the index file would looks something like this:

image1.tif 000000000000000000 000013220
image2.tif 000000000000013220 000012762

I would need to start at the beginning of the the image file read the first 13220 bytes and save those bytes as a .tif image. I would then need start at postion 13220 and read the next 12762 bytes and so on until all images are removed from the image file.

I assume I would need to use the Java Standard I/O libraries, but am not really sure since I have never done anything like this. What are my options for parsing through a large binary file and saving the tiff images contained therein as separate files?

Thanks.
15 years ago