openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r731652 - in /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/ejb/ component/xml/ config/ container/ event/ jms/ jpa/ transaction/ util/ xml/
Date Mon, 05 Jan 2009 19:27:27 GMT
Author: gerdogdu
Date: Mon Jan  5 11:27:26 2009
New Revision: 731652

URL: http://svn.apache.org/viewvc?rev=731652&view=rev
Log:
Arranging and testing for M1 Release.

Added:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ejb/EJBComponentImpl.java
  (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSUtil.java
  (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jpa/JPAUtil.java
  (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/transaction/TransactionUtil.java
  (with props)
Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLComponentImpl.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ResolutionUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java

Added: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ejb/EJBComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ejb/EJBComponentImpl.java?rev=731652&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ejb/EJBComponentImpl.java
(added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ejb/EJBComponentImpl.java
Mon Jan  5 11:27:26 2009
@@ -0,0 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.apache.webbeans.component.ejb;
+
+public class EJBComponentImpl
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ejb/EJBComponentImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLComponentImpl.java?rev=731652&r1=731651&r2=731652&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLComponentImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLComponentImpl.java
Mon Jan  5 11:27:26 2009
@@ -26,14 +26,18 @@
 import java.util.Set;
 
 import org.apache.webbeans.component.ComponentImpl;
+import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.xml.XMLInjectableConstructor;
 import org.apache.webbeans.inject.xml.XMLInjectableField;
 import org.apache.webbeans.inject.xml.XMLInjectableMethods;
 import org.apache.webbeans.inject.xml.XMLInjectionPointModel;
+import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.util.Asserts;
 
 public class XMLComponentImpl<T> extends ComponentImpl<T>
 {	
+	private static WebBeansLogger logger = WebBeansLogger.getLogger(XMLComponentImpl.class);
+	
 	/**Constructor injection point decleration*/
 	private XMLInjectableConstructor<T> injectableConstructor = null;
 	
@@ -44,7 +48,7 @@
 	private Map<Method,List<XMLInjectionPointModel>> injectableMethods = new HashMap<Method,
List<XMLInjectionPointModel>>();
 	
 	/**Initial field values of the webbean defined in the XML*/
-	private Map<String, Object> fieldValues = new HashMap<String, Object>();
+	private Map<Field, Object> fieldValues = new HashMap<Field, Object>();
 		
 	/**
 	 * Creates new XML defined webbeans component.
@@ -72,7 +76,14 @@
 		}
 		else
 		{
-			instance = this.injectableConstructor.doInjection();	
+			instance = this.injectableConstructor.doInjection();
+			super.afterConstructor(instance);
+		}
+		
+		/*Inject initial field values*/
+		if(instance != null)
+		{
+			injectFieldValues(instance);	
 		}
 		
 		return instance;
@@ -99,6 +110,36 @@
 		}
 	}
 
+	protected void injectFieldValues(T instance)
+	{
+		Set<Field> fieldSet = this.fieldValues.keySet();
+		Iterator<Field> itField = fieldSet.iterator();
+		
+		while(itField.hasNext())
+		{	
+			Field field = itField.next();
+			if(!field.isAccessible())
+			{
+				field.setAccessible(true);
+			}
+			
+			try
+			{
+				field.set(instance, this.fieldValues.get(field));
+				
+			} catch (IllegalArgumentException e)
+			{
+				logger.error("IllegalArgumentException is occured while calling the field : " + field.getName()
+ " on class " + instance.getClass().getName());
+				throw new WebBeansException(e);
+				
+			} catch (IllegalAccessException e)
+			{
+				logger.error("IllegalAccessException is occured while calling the field : " + field.getName()
+ " on class " + instance.getClass().getName());				
+				throw new WebBeansException(e);
+			}
+		}
+	}
+	
 
 	/* (non-Javadoc)
 	 * @see org.apache.webbeans.component.ComponentImpl#injectMethods(java.lang.Object)
@@ -172,7 +213,7 @@
 	 * @param name name of the field
 	 * @param value value of the field
 	 */
-	public void addFieldValue(String name, Object value)
+	public void addFieldValue(Field name, Object value)
 	{
 		fieldValues.put(name, value);
 	}
@@ -180,7 +221,7 @@
 	/**
 	 * @return the fieldValues
 	 */
-	public Map<String, Object> getFieldValues()
+	public Map<Field, Object> getFieldValues()
 	{
 		return fieldValues;
 	}

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java?rev=731652&r1=731651&r2=731652&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
Mon Jan  5 11:27:26 2009
@@ -18,6 +18,7 @@
 
 import java.io.InputStream;
 import java.lang.annotation.Annotation;
+import java.rmi.Naming;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
@@ -95,6 +96,8 @@
 				//JNDI bind
 				JNDIUtil.bind(WebBeansConstants.WEB_BEANS_MANAGER_JNDI_NAME, ManagerImpl.getManager());
 				
+				
+				
 				deployFromXML(scanner);
 				checkStereoTypes(scanner);				
 				configureInterceptors(scanner);

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java?rev=731652&r1=731651&r2=731652&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
Mon Jan  5 11:27:26 2009
@@ -1,18 +1,15 @@
 /*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You 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.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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.apache.webbeans.container;
 
@@ -39,56 +36,54 @@
 {
 	public InjectionResolver()
 	{
-		
+
 	}
-	
+
 	public static InjectionResolver getInstance()
 	{
-		InjectionResolver instance = (InjectionResolver)WebBeansFinder.getSingletonInstance(WebBeansFinder.SINGLETON_INJECTION_RESOLVER);
+		InjectionResolver instance = (InjectionResolver) WebBeansFinder.getSingletonInstance(WebBeansFinder.SINGLETON_INJECTION_RESOLVER);
 		return instance;
 	}
-	
+
 	public Set<Bean<?>> implResolveByName(String name)
 	{
-		Asserts.assertNotNull(name,"name parameter can not be null");
-		
+		Asserts.assertNotNull(name, "name parameter can not be null");
+
 		ManagerImpl manager = ManagerImpl.getManager();
-		
+
 		Set<Bean<?>> resolvedComponents = new HashSet<Bean<?>>();
 		Bean<?> resolvedComponent = null;
 		Set<Bean<?>> deployedComponents = manager.getBeans();
-		
+
 		Iterator<Bean<?>> it = deployedComponents.iterator();
-		while(it.hasNext())
+		while (it.hasNext())
 		{
 			Bean<?> component = it.next();
-			
-			if(component.getName() != null)
+
+			if (component.getName() != null)
 			{
-				if(component.getName().equals(name))
+				if (component.getName().equals(name))
 				{
-					if(resolvedComponent == null)
+					if (resolvedComponent == null)
 					{
 						resolvedComponent = component;
 						resolvedComponents.add(resolvedComponent);
-					}
-					else
+					} else
 					{
-						if(DeploymentTypeManager.getInstance().comparePrecedences(component.getDeploymentType(),
resolvedComponent.getDeploymentType()) > 0)
+						if (DeploymentTypeManager.getInstance().comparePrecedences(component.getDeploymentType(),
resolvedComponent.getDeploymentType()) > 0)
 						{
 							resolvedComponents.clear();
 							resolvedComponent = component;
 							resolvedComponents.add(resolvedComponent);
-						}
-						else if(DeploymentTypeManager.getInstance().comparePrecedences(component.getDeploymentType(),
resolvedComponent.getDeploymentType()) == 0)
+						} else if (DeploymentTypeManager.getInstance().comparePrecedences(component.getDeploymentType(),
resolvedComponent.getDeploymentType()) == 0)
 						{
 							resolvedComponents.add(component);
 						}
 					}
-				}				
-			}						
+				}
+			}
 		}
-				
+
 		return resolvedComponents;
 	}
 
@@ -96,197 +91,194 @@
 	{
 		Asserts.assertNotNull(apiType, "apiType parameter can not be null");
 		Asserts.assertNotNull(binding, "binding parameter can not be null");
-		
+
 		ManagerImpl manager = ManagerImpl.getManager();
-		
+
 		boolean currentBinding = false;
 		boolean returnAll = false;
-		
-		if(binding.length == 0)
+
+		if (binding.length == 0)
 		{
 			binding = new Annotation[1];
 			binding[0] = new CurrentLiteral();
 			currentBinding = true;
 		}
-		
+
 		Set<Bean<T>> results = new HashSet<Bean<T>>();
 		Set<Bean<?>> deployedComponents = manager.getBeans();
-		
-		if(apiType.equals(Object.class) && currentBinding)
+
+		if (apiType.equals(Object.class) && currentBinding)
 		{
 			returnAll = true;
 		}
-		
+
 		Iterator<Bean<?>> it = deployedComponents.iterator();
-		
-		while(it.hasNext())
+
+		while (it.hasNext())
 		{
 			Bean<?> component = it.next();
-			
-			if(returnAll)
+
+			if (returnAll)
 			{
-				results.add((Bean<T>)component);
+				results.add((Bean<T>) component);
 				continue;
 			}
-			
+
 			else
 			{
 				Set<Class<?>> componentApiTypes = component.getTypes();
 				Iterator<Class<?>> itComponentApiTypes = componentApiTypes.iterator();
-				while(itComponentApiTypes.hasNext())
+				while (itComponentApiTypes.hasNext())
 				{
 					Class<?> componentApiType = itComponentApiTypes.next();
-					
-					if(actualTypeArguments.length > 0)
+
+					if (actualTypeArguments.length > 0)
 					{
 						Type[] actualArgs = null;
-						if(ClassUtil.isAssignable(apiType,componentApiType))
+						if (ClassUtil.isAssignable(apiType, componentApiType))
 						{
-							/*Annotated Producer method or XML Defined Producer Method*/
-							if(ProducerComponentImpl.class.isAssignableFrom(component.getClass()))
+							/*
+							 * Annotated Producer method or XML Defined Producer
+							 * Method
+							 */
+							if (ProducerComponentImpl.class.isAssignableFrom(component.getClass()))
 							{
-								actualArgs = ((ProducerComponentImpl<?>)component).getActualTypeArguments();
-								if(Arrays.equals(actualArgs, actualTypeArguments))
+								actualArgs = ((ProducerComponentImpl<?>) component).getActualTypeArguments();
+								if (Arrays.equals(actualArgs, actualTypeArguments))
 								{
-									results.add((Bean<T>)component);
-									break;														
+									results.add((Bean<T>) component);
+									break;
 								}
-								
+
 							}
-							
+
 							else
 							{
 								actualArgs = ClassUtil.getGenericSuperClassTypeArguments(componentApiType);
-								if(Arrays.equals(actualArgs, actualTypeArguments))
+								if (Arrays.equals(actualArgs, actualTypeArguments))
 								{
-									results.add((Bean<T>)component);
-									break;														
-								}
-								else
+									results.add((Bean<T>) component);
+									break;
+								} else
 								{
 									List<Type[]> listActualArgs = ClassUtil.getGenericSuperInterfacesTypeArguments(componentApiType);
 									Iterator<Type[]> itListActualArgs = listActualArgs.iterator();
-									while(itListActualArgs.hasNext())
+									while (itListActualArgs.hasNext())
 									{
 										actualArgs = itListActualArgs.next();
 
-										if(Arrays.equals(actualArgs, actualTypeArguments))
+										if (Arrays.equals(actualArgs, actualTypeArguments))
 										{
-											results.add((Bean<T>)component);
-											break;														
+											results.add((Bean<T>) component);
+											break;
 										}
-										
+
 									}
 								}
-								
+
 							}
-														
+
 						}
-					}
-					else
+					} else
 					{
-						if(apiType instanceof Class)
+						if (apiType instanceof Class)
 						{
-							if(ClassUtil.isAssignable((Class<?>) apiType, componentApiType ))
+							if (ClassUtil.isAssignable((Class<?>) apiType, componentApiType))
 							{
-								results.add((Bean<T>)component);
+								results.add((Bean<T>) component);
 								break;
 							}
 						}
 					}
 				}
-			}			
-		}	
-		
+			}
+		}
+
 		results = findByBindingType(results, binding);
-		
-		if(results != null && !results.isEmpty())
+
+		if (results != null && !results.isEmpty())
 		{
-			results = findByPrecedence(results);	
-		}		
-		
+			results = findByPrecedence(results);
+		}
 
 		return results;
 	}
-	
+
 	private <T> Set<Bean<T>> findByPrecedence(Set<Bean<T>> result)
 	{
 		Bean<T> resolvedComponent = null;
 		Iterator<Bean<T>> it = result.iterator();
 		Set<Bean<T>> res = new HashSet<Bean<T>>();
-		
-		while(it.hasNext())
+
+		while (it.hasNext())
 		{
 			Bean<T> component = it.next();
-			
-			if(resolvedComponent == null)
+
+			if (resolvedComponent == null)
 			{
 				resolvedComponent = component;
 				res.add(resolvedComponent);
-			}
-			else
+			} else
 			{
 				DeploymentTypeManager typeManager = DeploymentTypeManager.getInstance();
-				
-				
-				if(typeManager.comparePrecedences(component.getDeploymentType(), resolvedComponent.getDeploymentType())
< 0)
+
+				if (typeManager.comparePrecedences(component.getDeploymentType(), resolvedComponent.getDeploymentType())
< 0)
 				{
-					continue;						
-				}
-				else if(typeManager.comparePrecedences(component.getDeploymentType(), resolvedComponent.getDeploymentType())
> 0)
+					continue;
+				} else if (typeManager.comparePrecedences(component.getDeploymentType(), resolvedComponent.getDeploymentType())
> 0)
 				{
 					res.clear();
 					resolvedComponent = component;
 					res.add(resolvedComponent);
-					
-				}else
+
+				} else
 				{
 					res.add(component);
 				}
 			}
 		}
-				
+
 		return res;
-	}		
-	
-	private <T> Set<Bean<T>> findByBindingType(Set<Bean<T>> remainingSet,
Annotation...annotations)
+	}
+
+	private <T> Set<Bean<T>> findByBindingType(Set<Bean<T>> remainingSet,
Annotation... annotations)
 	{
 		Iterator<Bean<T>> it = remainingSet.iterator();
 		Set<Bean<T>> result = new HashSet<Bean<T>>();
-		
-		while(it.hasNext())
+
+		while (it.hasNext())
 		{
 			Bean<T> component = it.next();
 			Set<Annotation> bTypes = component.getBindingTypes();
-			
+
 			int i = 0;
-			for(Annotation annot : annotations)
+			for (Annotation annot : annotations)
 			{
-				Iterator<Annotation> itBindingTypes = bTypes.iterator();	
-				while(itBindingTypes.hasNext())
+				Iterator<Annotation> itBindingTypes = bTypes.iterator();
+				while (itBindingTypes.hasNext())
 				{
-					Annotation bindingType = itBindingTypes.next();					
-					if(annot.annotationType().equals(bindingType.annotationType()))
+					Annotation bindingType = itBindingTypes.next();
+					if (annot.annotationType().equals(bindingType.annotationType()))
 					{
-						if(AnnotationUtil.isAnnotationMemberExist(bindingType.annotationType(),bindingType
, annot))
+						if (AnnotationUtil.isAnnotationMemberExist(bindingType.annotationType(), bindingType,
annot))
 						{
-							i++;	
+							i++;
 						}
 					}
-					
-				}				
+
+				}
 			}
-			
-			if(i == annotations.length)
+
+			if (i == annotations.length)
 			{
 				result.add(component);
 				i = 0;
 			}
-			
+
 		}
-		
+
 		remainingSet = null;
-		
+
 		return result;
-	}			
+	}
 }
\ No newline at end of file

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ResolutionUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ResolutionUtil.java?rev=731652&r1=731651&r2=731652&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ResolutionUtil.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ResolutionUtil.java
Mon Jan  5 11:27:26 2009
@@ -25,7 +25,6 @@
 import javax.webbeans.UnsatisfiedDependencyException;
 import javax.webbeans.manager.Bean;
 
-import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
 import org.apache.webbeans.util.ClassUtil;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java?rev=731652&r1=731651&r2=731652&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
Mon Jan  5 11:27:26 2009
@@ -28,7 +28,6 @@
 import javax.transaction.Status;
 import javax.transaction.Synchronization;
 import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
 import javax.webbeans.IfExists;
 import javax.webbeans.Observer;
 import javax.webbeans.ObserverException;
@@ -38,9 +37,9 @@
 import org.apache.webbeans.component.ObservesMethodsOwner;
 import org.apache.webbeans.config.WebBeansFinder;
 import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.transaction.TransactionUtil;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
-import org.apache.webbeans.util.JNDIUtil;
 
 @SuppressWarnings("unchecked")
 public final class NotificationManager implements Synchronization
@@ -205,7 +204,7 @@
 					TransactionalObserverType type = beanObserver.getType();
 					if(!type.equals(TransactionalObserverType.NONE))
 					{
-						Transaction transaction = JNDIUtil.getCurrentTransactionManager().getTransaction();
+						Transaction transaction = TransactionUtil.getCurrentTransactionManager().getTransaction();
 						if(transaction != null)
 						{
 							transaction.registerSynchronization(this);

Added: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSUtil.java?rev=731652&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSUtil.java
(added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSUtil.java
Mon Jan  5 11:27:26 2009
@@ -0,0 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.apache.webbeans.jms;
+
+public class JMSUtil
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jpa/JPAUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jpa/JPAUtil.java?rev=731652&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jpa/JPAUtil.java
(added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jpa/JPAUtil.java
Mon Jan  5 11:27:26 2009
@@ -0,0 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.apache.webbeans.jpa;
+
+public class JPAUtil
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jpa/JPAUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/transaction/TransactionUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/transaction/TransactionUtil.java?rev=731652&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/transaction/TransactionUtil.java
(added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/transaction/TransactionUtil.java
Mon Jan  5 11:27:26 2009
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.apache.webbeans.transaction;
+
+import javax.naming.NamingException;
+import javax.transaction.TransactionManager;
+
+import org.apache.webbeans.exception.WebBeansException;
+import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.util.JNDIUtil;
+
+public final class TransactionUtil
+{
+	private static WebBeansLogger logger = WebBeansLogger.getLogger(TransactionUtil.class);
+	
+	private static TransactionManager transactionManager = null;
+
+	private TransactionUtil()
+	{
+		
+	}
+	
+	public static TransactionManager getCurrentTransactionManager()
+	{
+		if(transactionManager == null)
+		{
+			try
+			{
+				transactionManager = (TransactionManager)JNDIUtil.getInitialContext().lookup("java:/TransactionManager");
+				
+			} catch (NamingException e)
+			{
+				logger.error("Unable to get TransactionManager",e);
+				throw new WebBeansException(e);
+			}
+		}
+		
+		return transactionManager;
+	}
+	
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/transaction/TransactionUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java?rev=731652&r1=731651&r2=731652&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java
Mon Jan  5 11:27:26 2009
@@ -18,7 +18,6 @@
 
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import javax.transaction.TransactionManager;
 
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.logger.WebBeansLogger;
@@ -27,8 +26,6 @@
 {
 	private static InitialContext initialContext = null;
 	
-	private static TransactionManager transactionManager = null;
-	
 	private static final WebBeansLogger LOGGER = WebBeansLogger.getLogger(JNDIUtil.class);
 	
 	static
@@ -65,8 +62,7 @@
 			
 		} catch (NamingException e)
 		{
-			LOGGER.error(e);
-			throw new WebBeansException("Unable to bind object with name : " + name ,e);
+			LOGGER.error("Unable to bind object with name : " + name ,e);
 		}
 	}
 	
@@ -85,23 +81,4 @@
 		}
 		
 	}
-	
-	public static TransactionManager getCurrentTransactionManager()
-	{
-		if(transactionManager == null)
-		{
-			try
-			{
-				transactionManager = (TransactionManager)getInitialContext().lookup("java:/TransactionManager");
-				
-			} catch (NamingException e)
-			{
-				LOGGER.error("Unable to get TransactionManager",e);
-				throw new WebBeansException(e);
-			}
-		}
-		
-		return transactionManager;
-	}
-
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java?rev=731652&r1=731651&r2=731652&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
Mon Jan  5 11:27:26 2009
@@ -1490,7 +1490,7 @@
 				
 				if ((objVal = ClassUtil.isValueOkForPrimitiveOrWrapper(fieldType, value)) != null)
 				{
-					component.addFieldValue(field.getName(), objVal);
+					component.addFieldValue(field, objVal);
 					
 				} else
 				{
@@ -1508,13 +1508,13 @@
 					throw new WebBeansConfigurationException(errorMessage);
 				}
 
-				component.addFieldValue(field.getName(), enumValue);
+				component.addFieldValue(field, enumValue);
 				
 			} 
 			else if (fieldType.equals(String.class)) /*String value*/
 			{
 				String value = child.getTextTrim();
-				component.addFieldValue(field.getName(), value);
+				component.addFieldValue(field, value);
 
 			} 
 			else if (fieldType.equals(Date.class) /*Date, Time, Sql Date, Time stamp, Calendar value*/

@@ -1532,7 +1532,7 @@
 				} 
 				else
 				{
-					component.addFieldValue(field.getName(), value);
+					component.addFieldValue(field, value);
 				}
 
 			} 
@@ -1547,7 +1547,7 @@
 				} 
 				else
 				{
-					component.addFieldValue(field.getName(), bigValue);
+					component.addFieldValue(field, bigValue);
 				}
 				
 			}
@@ -1562,7 +1562,7 @@
 				} 
 				else
 				{
-					component.addFieldValue(field.getName(), value);
+					component.addFieldValue(field, value);
 				}
 			} 
 			else if (List.class.isAssignableFrom(fieldType)) /*List value*/
@@ -1665,7 +1665,7 @@
 			}
 		}
 		
-		component.addFieldValue(field.getName(), list);	
+		component.addFieldValue(field, list);	
 	}
 	
 	/**
@@ -1757,7 +1757,7 @@
 			}
 		}
 
-		component.addFieldValue(field.getName(), set);
+		component.addFieldValue(field, set);
 	}
 	
 	/**



Mime
View raw message