pacman, what do you think?

(when lappy was away...)
Degatto broke down yesterday... No power, wouldnt turn on... Hopefully its just a power problem...
Update:
no, according to the technician it wasn't the power adaptor.. So am afraid ist something internal... syet! the entire board needs replacement! i can already hear my malnourished pockets screaming in agonizing pain... ironic since i just sold my old desktop a few weeks back so am literally naked... i'll try to buy a lotto ticket today because me thinks i direly need it.... *hikbi*


/*
* Created on Aug 1, 2004
*
* Author Rogelio M. Nocom Jr.
*
*/
package com.mobileindie.spring;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* @author nox
*
* based on Richard Hightowers article "orm without the container"
*
*/
public class ApplicationContextFactory {
// logger
private static Log log = LogFactory.getLog(ApplicationContextFactory.class);
// path and filename of application context
private static Object contextObject = null;
// make sure we are not loading twice...
private static int count = 0;
public static void init(String _contextObject) {
if (count >0) {
log.error("Can't initialize the application context twice: THIS SHOULD ONLY HAPPEN DURING TESTING");
}
contextObject = _contextObject;
count++;
}
public static void init(String[] _contextObject) {
if (count >0) {
log.error("Can't initialize the application context twice: THIS SHOULD ONLY HAPPEN DURING TESTING");
}
contextObject = _contextObject;
count++;
}
public static ApplicationContext getApplicationContext() {
if (contextObject == null) {
throw new IllegalStateException("Application context not initialized");
}
else if (contextObject instanceof String) {
String contextPath = (String) contextObject;
return new ClassPathXmlApplicationContext(contextPath);
}
else if (contextObject instanceof String[]) {
String[] contextPath = (String[]) contextObject;
return new ClassPathXmlApplicationContext(contextPath);
}
else {
throw new IllegalStateException("Context must be initialized via String or String[]");
}
}
}
public synchronized int get() {
while (available == false) {
try {
// wait for Producer to put value
wait();
} catch (InterruptedException e) {
}
}
available = false;
// notify Producer that value has been retrieved
notifyAll();
return contents;
}
public synchronized void put(int value) {
while (available == true) {
try {
// wait for Consumer to get value
wait();
} catch (InterruptedException e) {
}
}
contents = value;
available = true;
// notify Consumer that value has been set
notifyAll();
}