Skip to content

Commit

Permalink
More prototyping
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennifer Hickey committed Oct 1, 2009
1 parent 143c60c commit aefa11c
Show file tree
Hide file tree
Showing 168 changed files with 1,212 additions and 799 deletions.
41 changes: 21 additions & 20 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<classpathentry kind="lib" path="thirdparty/lib/postgresql/postgresql-7.4.3.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/postgresql/postgresql-8.1-407.jdbc3.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/postgresql/postgresql-8.2-505.jdbc3.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/quartz-1.6.5.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/quartz-1.6.5.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/quartz-jboss-1.6.5.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/quartz-oracle-1.6.5.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/snmp4j.jar"/>
Expand Down Expand Up @@ -224,27 +224,28 @@
<classpathentry kind="var" path="JBOSS_HOME/server/default/lib/jnpserver.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/com.springsource.com.sun.xml.bind-2.1.7.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/com.springsource.javax.xml.bind-2.1.7.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.aop-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.asm-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.aspects-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.beans-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.context-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.context.support-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.core-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.expression-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.instrument-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.instrument.classloading-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.integration-tests-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.jdbc-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.jms-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.orm-3.0.0.M4.jar" sourcepath="thirdparty/lib-src/org.springframework.orm-sources-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.oxm-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.test-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.transaction-3.0.0.M4.jar" sourcepath="thirdparty/lib-src/org.springframework.transaction-sources-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.web-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/spring/org.springframework.web.servlet-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.aop-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.asm-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.aspects-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.beans-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.context-3.0.0.M4.jar" sourcepath="thirdparty/lib-src/org.springframework.context-sources-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.context.support-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.core-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.expression-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.instrument-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.instrument.classloading-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.integration-tests-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.jdbc-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.jms-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.orm-3.0.0.M4.jar" sourcepath="thirdparty/lib-src/org.springframework.orm-sources-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.oxm-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.test-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.transaction-3.0.0.M4.jar" sourcepath="thirdparty/lib-src/org.springframework.transaction-sources-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.web-3.0.0.M4.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/spring/org.springframework.web.servlet-3.0.0.M4.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/com.springsource.org.aopalliance-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="thirdparty/lib/com.springsource.org.junit-4.6.0.jar"/>
<classpathentry kind="lib" path="thirdparty/lib/com.springsource.javax.xml.stream-1.0.1.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
build
junit_results
ui_plugins/*/bin
**/.DS_Store


7 changes: 1 addition & 6 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,15 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.codehaus.groovy.eclipse.groovyBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.codehaus.groovy.eclipse.groovyNature</nature>
</natures>
</projectDescription>
4 changes: 0 additions & 4 deletions .springBeans
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<configs>
<config>etc/META-INF/spring/dao-context.xml</config>
<config>etc/META-INF/spring/ejb-context.xml</config>
<config>unittest/resources/test-context.xml</config>
<config>etc/META-INF/spring/transaction-context.xml</config>
<config>etc/META-INF/spring/infrastructure-context.xml</config>
<config>etc/META-INF/spring/core-context.xml</config>
</configs>
<configSets>
</configSets>
Expand Down
54 changes: 30 additions & 24 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -374,24 +374,7 @@
<replacefilter token="@@@server.quartzDelegate@@@" value="${quartz.delegate}"/>
</replace>

<!-- TODO: Create separate jars for each component -->
<jar file="${ear.dir}/hq.jar" basedir="${build.dir}/classes" >
<include name="images/**" />
<include name="org/hyperic/**" />
<exclude name="org/hyperic/hq/ui/**" />
<exclude name="org/hyperic/tools/ant/**" />
<exclude name="org/hyperic/tools/db/**" />
<exclude name="org/hyperic/hq/plugin/**"/>
<!-- Exclude unit tests -->
<exclude name="org/hyperic/**/*_test*"/>
</jar>

<!-- We only want server and shared classes for the UI -->
<jar file="${ear.dir}/hq.jar" basedir="${build.dir}/classes"
update="true">
<include name="org/hyperic/hq/ui/server/session/**"/>
<include name="org/hyperic/hq/ui/shared/**"/>
</jar>


<!-- Write version resource -->
<antcall target="write-version-file">
Expand All @@ -403,12 +386,7 @@
<fileset dir="etc" includes="product.properties" />
</copy>

<jar basedir="${build.dir}/src"
jarfile="${ear.dir}/hq.jar"
update="true">
<include name="version.properties"/>
<include name="product.properties"/>
</jar>
<antcall target="pack-hq-jar"/>

<copy todir="${ear.dir}/lib" >
<fileset dir="${thirdparty.lib}" >
Expand Down Expand Up @@ -512,6 +490,34 @@

<touch file="${ear.dir}/META-INF/application.xml" />
</target>

<target name="pack-hq-jar">
<!-- TODO: Create separate jars for each component -->
<jar file="${ear.dir}/hq.jar" basedir="${build.dir}/classes" >
<include name="images/**" />
<include name="org/hyperic/**" />
<exclude name="org/hyperic/hq/ui/**" />
<exclude name="org/hyperic/tools/ant/**" />
<exclude name="org/hyperic/tools/db/**" />
<exclude name="org/hyperic/hq/plugin/**"/>
<!-- Exclude unit tests -->
<exclude name="org/hyperic/**/*_test*"/>
</jar>

<!-- We only want server and shared classes for the UI -->
<jar file="${ear.dir}/hq.jar" basedir="${build.dir}/classes"
update="true">
<include name="org/hyperic/hq/ui/server/session/**"/>
<include name="org/hyperic/hq/ui/shared/**"/>
</jar>

<jar basedir="${build.dir}/src"
jarfile="${ear.dir}/hq.jar"
update="true">
<include name="version.properties"/>
<include name="product.properties"/>
</jar>
</target>

<target name="pack-ear" depends="pack-ear-files,write-ear-manifest"/>

Expand Down
2 changes: 1 addition & 1 deletion build_util/jsp-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<javac destdir="${build.dir}/jsp/classes"
optimize="off"
source="${hq.javac.source}"
source="1.4"
debug="off">
<classpath refid="jsp-jars"/>
<src path="${build.dir}/jsp/src"/>
Expand Down
20 changes: 0 additions & 20 deletions dd/session/ejb-jar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -887,19 +887,6 @@

</session>

<session >
<description><![CDATA[]]></description>

<ejb-name>GalertManager</ejb-name>

<local-home>org.hyperic.hq.galerts.shared.GalertManagerLocalHome</local-home>
<local>org.hyperic.hq.galerts.shared.GalertManagerLocal</local>
<ejb-class>org.hyperic.hq.galerts.server.session.GalertManagerEJBImpl</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>

</session>

<session >
<description><![CDATA[BizApp interface to the Measurement subsystem]]></description>

Expand Down Expand Up @@ -6286,13 +6273,6 @@
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction >
<method >
<ejb-name>GalertManager</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction >
<method >
<ejb-name>MeasurementBoss</ejb-name>
Expand Down
15 changes: 0 additions & 15 deletions dd/session/jboss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@
<ejb-name>EventLogManager</ejb-name>
<local-jndi-name>LocalEventLogManager</local-jndi-name>

</session>
<session>
<ejb-name>ResourceManager</ejb-name>
<local-jndi-name>LocalResourceManager</local-jndi-name>

</session>
<session>
<ejb-name>AIScheduleManager</ejb-name>
Expand Down Expand Up @@ -243,11 +238,6 @@
<ejb-name>AlertDefinitionManager</ejb-name>
<local-jndi-name>LocalAlertDefinitionManager</local-jndi-name>

</session>
<session>
<ejb-name>ResourceGroupManager</ejb-name>
<local-jndi-name>LocalResourceGroupManager</local-jndi-name>

</session>
<session>
<ejb-name>CrispoManager</ejb-name>
Expand Down Expand Up @@ -361,11 +351,6 @@
<ejb-name>HeartBeatService</ejb-name>
<local-jndi-name>LocalHeartBeatService</local-jndi-name>

</session>
<session>
<ejb-name>GalertManager</ejb-name>
<local-jndi-name>LocalGalertManager</local-jndi-name>

</session>
<session>
<ejb-name>MeasurementBoss</ejb-name>
Expand Down
11 changes: 0 additions & 11 deletions etc/META-INF/spring/core-context.xml

This file was deleted.

22 changes: 19 additions & 3 deletions etc/META-INF/spring/dao-context.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
Expand All @@ -11,6 +14,19 @@
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}"
p:username="${jdbc.username}" p:password="${jdbc.password}" />

<context:annotation-config />
<context:component-scan base-package="org.hyperic,com.hyperic">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
</context:component-scan>

<jee:jndi-lookup id="sessionFactory" jndi-name="java:/HibernateSessionFactory"></jee:jndi-lookup>

<bean class="org.hyperic.hq.authz.shared.PermissionManagerImpl"/>

<bean class="org.springframework.orm.hibernate3.HibernateTemplate">
<constructor-arg ref="sessionFactory"/>
</bean>


</beans>
18 changes: 17 additions & 1 deletion etc/META-INF/spring/ejb-context.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

<bean class="org.hyperic.hq.appdef.server.session.AgentManagerEJBImpl" factory-method="getOne"/>
<bean class="org.hyperic.hq.appdef.server.session.AIQueueManagerEJBImpl" factory-method="getOne"/>
Expand Down Expand Up @@ -72,4 +76,16 @@
<bean class="org.hyperic.hq.scheduler.server.session.SchedulerEJBImpl" factory-method="getOne"/>
<bean class="org.hyperic.hq.ui.server.session.DashboardManagerEJBImpl" factory-method="getOne"/>

<tx:jta-transaction-manager />

<tx:annotation-driven />



<context:annotation-config />

<context:component-scan base-package="org.hyperic,com.hyperic">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service"/>
</context:component-scan>

</beans>
12 changes: 0 additions & 12 deletions etc/META-INF/spring/infrastructure-context.xml

This file was deleted.

13 changes: 0 additions & 13 deletions etc/META-INF/spring/transaction-context.xml

This file was deleted.

2 changes: 1 addition & 1 deletion etc/hibernate.properties
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ hibernate.jdbc.batch_size=200

# JBoss J2EE container integration
hibernate.session_factory_name=java:/HibernateSessionFactory
hibernate.current_session_context_class=org.hyperic.hq.hibernate.CurrentSessionFinder
#hibernate.current_session_context_class=org.hyperic.hq.hibernate.CurrentSessionFinder
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.transaction.factory_class=org.hibernate.transaction.CMTTransactionFactory
2 changes: 1 addition & 1 deletion etc/spring-jdbc.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/HQ
jdbc.url=jdbc:mysql://localhost:3306/hqdb
jdbc.username=hq
jdbc.password=hq
2 changes: 1 addition & 1 deletion src/org/hyperic/dao/DAOFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
public abstract class DAOFactory {
public abstract Session getCurrentSession();
//TODO something better
private static HibernateDAOFactory hibernateDAOFactory;
private static HibernateDAOFactory hibernateDAOFactory = new HibernateDAOFactory();

public abstract AppServiceDAO getAppServiceDAO();
public abstract AppSvcDependencyDAO getAppSvcDepencyDAO();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import org.hyperic.hq.common.SystemException;
import org.hyperic.hq.common.VetoException;
import org.hyperic.hq.common.server.session.AuditManagerEJBImpl;
import org.hyperic.hq.context.Bootstrap;
import org.hyperic.hq.dao.AIIpDAO;
import org.hyperic.hq.dao.AIPlatformDAO;
import org.hyperic.hq.dao.AIServerDAO;
Expand Down Expand Up @@ -104,7 +105,7 @@ public class AIQueueManagerEJBImpl

private final AI2AppdefDiff appdefDiffProcessor = new AI2AppdefDiff();
private final AIQSynchronizer queueSynchronizer = new AIQSynchronizer();
private AIServerDAO aIServerDAO;
private AIServerDAO aIServerDAO = Bootstrap.getBean(AIServerDAO.class);

public AIQueueManagerEJBImpl () {}

Expand Down
Loading

0 comments on commit aefa11c

Please sign in to comment.