From c78fb9aae1ee84a00ee4813c9b1da1d2a46b988e Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 8 Feb 2007 12:48:40 +0000 Subject: [PATCH] --- .../java/org/wamblee/mythtv/Application.java | 47 +++++++++++++++++++ .../org/wamblee/mythtv/MythtvBeanFactory.java | 34 ++++++++++++++ .../mythtv/MythtvHibernateMappings.java | 29 ++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 mythtv/src/main/java/org/wamblee/mythtv/Application.java create mode 100644 mythtv/src/main/java/org/wamblee/mythtv/MythtvBeanFactory.java create mode 100644 mythtv/src/main/java/org/wamblee/mythtv/MythtvHibernateMappings.java diff --git a/mythtv/src/main/java/org/wamblee/mythtv/Application.java b/mythtv/src/main/java/org/wamblee/mythtv/Application.java new file mode 100644 index 00000000..d2135639 --- /dev/null +++ b/mythtv/src/main/java/org/wamblee/mythtv/Application.java @@ -0,0 +1,47 @@ +/* + * Copyright 2006 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.wamblee.mythtv; + +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wamblee.general.BeanKernel; + +/** + *f + */ +public class Application implements ServletContextListener { + private static final Log LOG = LogFactory.getLog(Application.class); + + /* (non-Javadoc) + * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent) + */ + public void contextInitialized(ServletContextEvent arg0) { + LOG.info("initializing"); + BeanKernel.getBeanFactory(); + } + + + /* (non-Javadoc) + * @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent) + */ + public void contextDestroyed(ServletContextEvent arg0) { + LOG.info("terminating"); + } +} diff --git a/mythtv/src/main/java/org/wamblee/mythtv/MythtvBeanFactory.java b/mythtv/src/main/java/org/wamblee/mythtv/MythtvBeanFactory.java new file mode 100644 index 00000000..f29911d7 --- /dev/null +++ b/mythtv/src/main/java/org/wamblee/mythtv/MythtvBeanFactory.java @@ -0,0 +1,34 @@ +/* + * Copyright 2005 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.wamblee.mythtv; +import org.wamblee.general.SpringBeanFactory; + + +/** + * Bean factory for the crawler application. + */ +public class MythtvBeanFactory extends SpringBeanFactory { + private static final String SELECTOR_NAME = "beanRefContext.xml"; + private static final String FACTORY_NAME = "mythtv"; + + /** + * Constructs the bean factory. + * + */ + public MythtvBeanFactory() { + super(SELECTOR_NAME, FACTORY_NAME); + } +} diff --git a/mythtv/src/main/java/org/wamblee/mythtv/MythtvHibernateMappings.java b/mythtv/src/main/java/org/wamblee/mythtv/MythtvHibernateMappings.java new file mode 100644 index 00000000..b555fb52 --- /dev/null +++ b/mythtv/src/main/java/org/wamblee/mythtv/MythtvHibernateMappings.java @@ -0,0 +1,29 @@ +/* + * Copyright 2006 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.wamblee.mythtv; + +import org.wamblee.persistence.hibernate.HibernateMappingFiles; + +/** + * + */ +public class MythtvHibernateMappings extends HibernateMappingFiles { + + public MythtvHibernateMappings() { + // Empty + } +} -- 2.31.1