VEA - Enterprise Application Development

cube

Subject describe characteristic of enterprise applications. Design patterns for enterprise applications are presented to students. Next area are JAVA frameworks used for enterprise application development. Studets are lerned about three commonly used layers of enterprise architecture so students are lerned mostly used layred enterprise architecture. Codes and labs are focused to Spring.io framework.

Homework assignment

Create a group presentation on a project from last semester (or similar) and focus on:

  1. Project architecture
  2. The use of design patterns in the project and the libraries used
  3. Detailed description of the principles and how they are validated and how they work
  4. Include experimental results
  5. Interaction of the different designs and technologies and implications on the method of use

public interface SimpleEntity

package vea2015;

public interface SimpleEntity {

public void setId(int id);
}

startNetworkServer.bat

:runNoClasspath
"%_JAVACMD%" %DERBY_OPTS% -Duser.language=en -Dderby.drda.debug=true -classpath "%LOCALCLASSPATH%" org.apache.derby.drda.NetworkServerControl start %DERBY_CMD_LINE_ARGS%
goto end

xml config

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:jee = "http://www.springframework.org/schema/jee"
xmlns:tx = "http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
">

<context:component-scan base-package="vea2015" />
<mvc:annotation-driven />
<aop:aspectj-autoproxy />
<context:load-time-weaver/>
<jee:jndi-lookup id="vea2015DS" jndi-name="java:jboss/datasources/vea2015"></jee:jndi-lookup>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/views/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean class="org.springframework.context.support.ResourceBundleMessageSource"
id="messageSource">
<property name="basename" value="messages" />
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.apache.derby.jdbc.ClientDriver"/>
<property name="url" value="jdbc:derby://localhost/vea2015;create=true"/>
<property name="username" value="app"/>
<property name="password" value="app"/>
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="vea2015"/>
<property name="packagesToScan" value="vea2015" />
<property name="dataSource" ref="vea2015DS" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">create-drop</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.DerbyTenSevenDialect</prop>
</props>
</property>
</bean>
<tx:annotation-driven />
<bean id="persistenceExceptionTranslationPostProcessor"
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
</beans>

transaction manager

<bean id="transactionManager" 
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>

Create tables

CREATE TABLE Person (id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), name varchar(255), surname varchar(255), dob DATE, shipId INTEGER REFERENCES StarShip(id) , CONSTRAINT Person_primarykey PRIMARY KEY (id))

CREATE TABLE StarShip (id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), callSign varchar(255), army BOOLEAN, crewCapacity INTEGER, CONSTRAINT StarShip_primarykey PRIMARY KEY (id))