Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

Nadine McKenzie

Ranch Hand
+ Follow
since Feb 15, 2002
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 Nadine McKenzie

I have a variety of error messages I display on my form to handle required and/or invalid input.

1- Most of my validation is handled by a custom validator that takes regex (e.g. RegexValidator implements Validator, StateHolder {...})
2- In my form fields I have added <h:inputText required="true" requiredMessage="Customer Phone Number.... />
3- for cross field validation, I added the validation in my bean to check for required fields (e.g. a field(s) becomes required when another field gets filled in). The bean performs an addMessage and page navigation. In addition, some of those fields have my custom validator.

Hopefully this gives you an idea of the diversity of messages.

My error messages appear in piecemeal fashion. Then as the first batch of errors are fixed, the next batch displays, and so on.

My question is how do I get all the error messages to appear at once. I'm ok with "required" messages appearing first and then "invalid" appearing in a second batch but that is as far as I'd like to go. I know I can move everything over to my bean layer but I don't want take that route because I'd be giving up ease of use and reuse.
>
8 years ago
JSF
I looked into the CFA and it is a very hard and rigorous program. Unless you have a masters in business you would fair much better to take your series 7 exam. CFA has 3 exams and it takes years to get through all of them. If this is what you want, however, becoming a CFA will lead to much larger $$$'s than programming. Mid and senior level CFA's make 300K+ a year.
10 years ago
Which two methods are guaranteed to be available in a CMP bean's local home interface? (Choose two.)


A remove(Object)
B remove(Handle)
C findByPrimaryKey(primary key)
D create()

I need a sanity check her. The correct answer is A and C. But I think A and C are more correct? Help!
EJB 2.0 Specification 71-72
Which can the bean provider IGNORE when ensuring that a session bean is properly passivated?


A closing database connections
B
closing socket connections
C
saving a reference to the local home interface
D
saving a reference to the SessionContext

The correct answer is C. But my question is shouldn't it also be D?
I'm new to Hibernate and I'd like Hibernate to pick up the username and password from the JAAS Authentication entry. Can someone please tell me how this is set up via the hibernate.properties (or otherwise). Thanks so much.
One tutorial I came across said "A SessionFactory is threadsafe, many threads can access it concurrently and request Sessions. A Session is a non-threadsafe object that represents a single unit-of-work with the database."
And it goes on to explain how to correct the problem using the ThreadLocal class.

The issue is I'm having is I'm not using
s = sessionFactory.openSession();

Instead, I'm using the openSession that takes a Connection.
s = sessionFactory.openSession(conn);

Since javax.sql.connection is open and closed after every unit of work, I'm not sure how to make session threadsafe.

Any thoughts?
That's what I thought. Pass by reference and the fact that the object is not being serialized (marshalled and unmarshalled). I needed to know anyways in case there was something I was missing. ThanKs folks!
Do local ejb's incur a network cost? If yes, how does it compare to the cost of a remote call?
I'm a contractor and a year ago I ended my contract through a recruiting agency. Myself and a number of other contractors had many issues getting paid from this recruitment agency as well. To this date, I am still unable to collect. BTW the name of the company is Nu Info Systems (NuIs). Is there a website where we can report deadbeats?
12 years ago
The reason why I was asking these questions is because my problem actually goes deeper. I have (say for the sake of simplicity) 3 projects. myWeb, coreWeb and myEar. Both use struts 1.1 and this jar is in the lib of each project. When I set up project dependencies, there are no build errors, however, I am seeing a runtime error:


RpeRequestProcessor sits in myWeb and extends CoreRequestProcessor which sits in coreWeb. CoreRequestProcessor extends TilesRequestProcessor.

myWeb has Project References to coreWeb, and myEar.
myWeb's Java Build Path has coreWeb checked
myWeb's Order and Export has struts.jar and coreWeb checked (and in this order)

myEar has Project References to myWeb only.
Can someone tell me exactly what is the purpose of "project references" in Eclipse. I'm setting up project dependencies and I'm going through what seems to me a whole ceremony. I'd really like some literature that explains what all these do. I'm seeing alot of literature that says what to do but not why it is done and what it does behind the scenes.

Project Dependencies,
Java Build Path/Projects
Java Build Path/Order and Export

Also, why in addition to these do I have to
add folders in the Server Properties and
modify the application.xml?
This is what I thought. But it is logically obtuse. If it were set to "session" it would die when the session timesout. If it were "page" it would die when the page dies. It would have been better if setting the scope to "request" would behave as request.setAttribute. Oh well...
13 years ago
JSP
I have this code...
<logic resent name="results" scope="request">
<c:set var="resultsInRequest" scope="request" value="requestScope.results" />
</logic resent>
<logic resent name="search" scope="request">
<c:set var="searchInRequest" scope="request" value="requestScope.search"/>
</logic resent>

Since I'm setting my scope as request vs page, I would expect that when submitting this page that both resultsInRequest and searchInRequest could be retrieved from the HttpServletRequest request.getAttribute("searchInRequest").

Does anybody know what I'm doing wrong? ThanKs!
13 years ago
JSP
That's is an interesting approach, but not the one we are using. We have 2 base exception classes, one that extends RuntimeException and one that extends Exception.

Both base classes are identical in every other respect. Both are mimicking the JDK 1.4's built in exception chaining in our JDK1.3 code. Here's a code snippet...


private Throwable cause = null;
private boolean initialized = false;


public CascadeException() { super(); }

public CascadeException(Throwable cause) {
this();
initCause(cause);
}
public Throwable getCause() { return cause; }
public Throwable initCause(Throwable cause) {

if(cause == this) {
throw new IllegalArgumentException("cause cannot be this");
}

if(initialized) {
throw new IllegalStateException("initCause already called");
}

initialized = true;
this.cause = cause;

return this;
}

I'm still puzzled as to why we would want to extend RuntimeException. My hunch was it was because we are using EJB local and remote... but that was just a guess. Any ideas?
13 years ago
Can someone tell me why I would want to create a base exception class that extends RunTimeException? We are using jdk 1.3 and using exception chaining.
13 years ago