Coverage Report - org.dozer.osgi.Activator
 
Classes in this File Line Coverage Branch Coverage Complexity
Activator
0%
0/9
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2013 Dozer Project
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *      http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.dozer.osgi;
 17  
 
 18  
 import org.dozer.DozerInitializer;
 19  
 import org.dozer.config.BeanContainer;
 20  
 import org.osgi.framework.BundleActivator;
 21  
 import org.osgi.framework.BundleContext;
 22  
 import org.slf4j.Logger;
 23  
 import org.slf4j.LoggerFactory;
 24  
 
 25  
 /**
 26  
  * @author Dmitry Buzdin
 27  
  */
 28  0
 public final class Activator implements BundleActivator {
 29  
 
 30  0
   private final Logger log = LoggerFactory.getLogger(Activator.class);
 31  
 
 32  
   public void start(BundleContext bundleContext) throws Exception {
 33  0
     log.info("Starting Dozer OSGi bundle");
 34  0
     OSGiClassLoader classLoader = new OSGiClassLoader(bundleContext);
 35  0
     BeanContainer.getInstance().setClassLoader(classLoader);
 36  0
     DozerInitializer.getInstance().init(Activator.class.getClassLoader());
 37  0
   }
 38  
 
 39  
   public void stop(BundleContext bundleContext) throws Exception {
 40  0
     log.info("Dozer OSGi bundle stopped");
 41  0
   }
 42  
 
 43  
 }