Amy Saari

Ranch Hand
+ Follow
since Sep 13, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Amy Saari

Hi All

We're seeing NoSuchMethodError exceptions when apps are redeploying and (we think) people are trying to hit them. We're running Weblogic 10.3.6 and jdk 6. Has anyone seen anything like that (I searched this forum and the net but didn't find much)? A bounce of the server fixes it - so that seems a bit odd. My guess would have been out of sync versions of the same jar files (getting pulled in via maven dependencies or something along those lines), but I wouldn't think just bouncing the server would fix that.

What are we missing? Anyone know? Any suggestions to diagnose (it's intermittent so it's hard to pin it down).

Thanks for any suggestions....have a great day....
Amy
10 years ago
All

I'm stuck. In a swing app - I need to work with plain text files off the disk, but want users to be able to use RTF while they work with the file. Then, on the save to the disk, I have to convert the file back to plain text - it's okay that the RTF gets blown away - they don't care - the RTF is only for convenience while the file is displayed in the editor.

I got jEdit working in my swing app, but I don't seem to be able to tell it that the Content Type is rtf (I convert it to rtf when I read it in off the disk).

Anyone know how ?

Thanks for any help...
Amy
11 years ago
Hi WP - I did see those, but it wasn't clear to me if 11 would run on the T5220 (I'm a java app developer not a doctor)...

However this page

http://wesunsolve.net/bugid/id/6974168

has this info:

# uname -a
SunOS d4v-t5220a-prg06 5.11 snv_149 sun4v sparc SUNW,SPARC-Enterprise-T5220 Solaris

Thanks for your reponse.
Amy
11 years ago

Hi - I have a sparc box and need to figure out what the latest release of the OS is ---- can anyone tell me where to look for that ?

Thanks for any help,
Amy

SunOS 5.10 Generic_147440-12 sun4v sparc SUNW,SPARC-Enterprise-T5220

11 years ago
All

This took a bit to figure out so I thought I would share.



See that # - if you're using toplink you want the # for a named substitution BUT if you're using hibernate you want a :
and somefield is a string in the above - you don't need to wrap it in quotes. toplink at least will figure it out.

sheesh....that su...ed...and yes i know, i know, blah, blah, blah....don't use native queries...more blahs...
hope the above is helpful....

Amy
Thank you both very much

Amy
Hi All

We're really having a hard time trying to figure out if our code is really threadsafe. We have a web app that contains spring-injected services that use a dao layer to get to the database via Hibernate. We injected the services into INSTANCE variables in the servlet - so every request that comes in becomes a thread that uses those same service objects. The service object contains a dao object that is used to access the database via hibernate (oracle in this case).

So, for example, the contactService is an instance variable in the this servlet



this call is made from the servlet to the service



in the ContactService class we use a dao class:



and make this call:



in the ContactDao class is the method:



From what I understand the org.hibernate.Query is not threadsafe. So is it possible our code is not threadsafe because each thread started by the servlet container is using the same service and dao objects?

Thanks for any help.
Amy
Hi Bear,

I wish you had not moved this to Struts - it doesn't have anything to do with Struts (I should have just left the Action off and put in HttpServlet). Can you / would you move it back perhaps?

We know it's not thread safe. The question is this:

If two classes extend an abstract class that extends HttpServlet - how many instance of an instance variable in the abstract class exist? One or two?

Thanks,
Amy
14 years ago
Hi All

I need some help if you have a minute. We have an app in production that's behaving poorly. We know we have a NOT thread safe condition where two threads running through the same servlet are looking at the same value in an instance variable (userName in the example below). So, for example, two threads in the class first are looking at a single copy of userName.

But what about this - can one thread in first and one thread in second be looking at the same instance of userName? if baseclass is abstract, then are there two instances of userName? one when new is called for class first and one when new is called for class second by the servlet container? know what i mean?

Here's some simple pseudo code to illustrate :




thanks for any thoughts,
amy
14 years ago
JR

I used ajax4jsf - so our examples aren't exactly the same. I think you have to tell JSF about this property inside this bean in the faces-config.xml inside the managed-bean tag. See:

webpage

See if this helps - I'd be interested to know if that's the problem...

Amy
15 years ago
JSF
But that was the point

pass the id of the component to the backing bean inside the inputText tag.

<f:param name="currentId" value="officeEmail" binding="#{myClass.currentId}" />


String currentId;

public void setCurrentId(String s) {
currentId = s;
}

UIComponent field = fc.getViewRoot().findComponent(currentId);
15 years ago
JSF
Hi JR

I used the tag:

<a4j:actionparam name="desc#{rowIndex}ID" value="#{rowIndex}" assignTo="#{DescriptionHandler.rowUpdated}" />

to tell the backing bean what component in a list was clicked (ie the setter for rowUpdated is called).
I think you can get core functionality (if you're not using a4j) from the tags:

f:attribute

or

f:param

Amy
15 years ago
JSF
fyi

I stripped out a lot from this page and still couldn't figure out the problem. I had upgraded richfaces from 3.1.4 to 3.3.0 and suspect that there is a javascript error on the page ...
15 years ago
JSF
Hi Folks,
I'm trying to reRender specific components on the page, but am getting a whole page refresh - I had this working and then did something to break it - I just can't seem to see what the problem is. Below is the page - it has tabs and then a panel inside the tab and then a list of inplaceInput tags that crank out an editable list of strings from the server. There are 3 images next to each inplaceInput that

a) add a new inplaceInput below the existing one
b) delete the inplaceInput
c) change the font color of the inplaceInput and toggle the image to the correct font color

I added id values to all the tags, but that didn't seem to help and pointed the reRender of the image toggle to both the region or the inplaceInput - no luck - if anyone has any ideas, I would greatly appreciate it...

Thanks,
Amy

15 years ago
JSF
I added a4j:commandLink tags so the user can click on the icon to add a description to the list or delete one. The glue bean code for those methods is trivial so I didn't include it. Also the a4j:region tag will prevent a screen blink as it tells the browser to just update that single inplaceInput component. This also allows the user to double click on multiple lines and open them for editing and then save one of the edits without closing the other component edits - if that makes sense...

Amy

15 years ago
JSF