~ubuntu-branches/ubuntu/maverick/eucalyptus/maverick

« back to all changes in this revision

Viewing changes to clc/modules/database/conf/scripts/after_database.groovy

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2010-07-21 17:27:10 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721172710-7xv07dmdqgivc3t9
Tags: 2.0~bzr1211-0ubuntu1
* New major upstream version merge, 2.0 (r1211).
* debian/patches/:
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import com.eucalyptus.entities.PersistenceContexts;
1
2
import org.hibernate.ejb.*
2
3
import com.eucalyptus.util.*
3
4
import edu.ucsb.eucalyptus.cloud.ws.*;
9
10
  'hibernate.hbm2ddl.auto': 'update',
10
11
  'hibernate.generate_statistics': 'true',
11
12
]
12
 
contexts = ['general','images','auth','config','walrus','storage','dns']
13
 
contexts.each {  
 
13
contexts = PersistenceContexts.list( );
 
14
contexts.each { String ctxName ->
 
15
  String it = ctxName.replaceAll("eucalyptus_","")
14
16
  pool_config = new pools(new Binding([context_name:it])).run()
15
17
  cache_config  = new caches(new Binding([context_name:it])).run()
16
18
  config = new Ejb3Configuration();
17
 
  LogUtil.logHeader( "Hibernate for ${it}" ).log(hiber_config.inspect())
 
19
  LogUtil.logHeader( "Hibernate for ${ctxName}" ).log(hiber_config.inspect())
18
20
  hiber_config.each { k, v -> config.setProperty(k, v) }
19
 
  LogUtil.logHeader( "Pool for ${it}").log( pool_config.inspect() )
 
21
  LogUtil.logHeader( "Pool for ${ctxName}").log( pool_config.inspect() )
20
22
  pool_config.each { k, v -> config.setProperty(k, v) }
21
 
  LogUtil.logHeader( "Cache for ${it}").log( cache_config )
 
23
  LogUtil.logHeader( "Cache for ${ctxName}").log( cache_config )
22
24
  cache_config.each { k, v -> config.setProperty(k, v) }
23
 
  entity_list = new entities(new Binding([context_name:it])).run()
24
 
  LogUtil.logHeader("Entities for ${it}")
 
25
  entity_list = PersistenceContexts.listEntities( ctxName )
 
26
  LogUtil.logHeader("Entities for ${ctxName}")
25
27
  entity_list.each{ ent ->
26
28
    LogUtil.log( ent.toString() )
27
29
    config.addAnnotatedClass( ent )
28
30
  }
29
31
  try {
30
 
    DatabaseUtil.registerPersistenceContext("eucalyptus_${it}", config)
 
32
    PersistenceContexts.registerPersistenceContext("${ctxName}", config)
31
33
  } catch( Throwable t ) {
32
34
    t.printStackTrace();
33
35
    System.exit(1)