Author: meerajk
Date: Sun Nov 5 02:46:28 2006
New Revision: 471394
URL: http://svn.apache.org/viewvc?view=rev&rev=471394
Log:
Initial revision.
Added:
incubator/tuscany/java/sca/services/persistence/common/src/main/java/org/apache/tuscany/service/persistence/common/EmfBuilder.java
(with props)
Added:
incubator/tuscany/java/sca/services/persistence/common/src/main/java/org/apache/tuscany/service/persistence/common/EmfBuilder.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/common/src/main/java/org/apache/tuscany/service/persistence/common/EmfBuilder.java?view=auto&rev=471394
==============================================================================
---
incubator/tuscany/java/sca/services/persistence/common/src/main/java/org/apache/tuscany/service/persistence/common/EmfBuilder.java
(added)
+++
incubator/tuscany/java/sca/services/persistence/common/src/main/java/org/apache/tuscany/service/persistence/common/EmfBuilder.java
Sun Nov 5 02:46:28 2006
@@ -0,0 +1,50 @@
+/*
+ * 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.tuscany.service.persistence.common;
+
+import javax.persistence.EntityManagerFactory;
+
+/**
+ * Utility class for building entity manager factories.
+ *
+ */
+public final class EmfBuilder {
+
+ /**
+ * Private constructor for utility class.
+ *
+ */
+ private EmfBuilder() {
+ }
+
+ /**
+ * Builds the entity manager factory matching the unit name. All
persistence.xml
+ * files available for the specified classloader is scanned for the
specified
+ * persistence unit. The JPA provider API is used to create the entity
manager
+ * factory.
+ *
+ * @param unitName Persistence unit name.
+ * @param classLoader Classloader.
+ * @return Entity manager factory.
+ */
+ public static EntityManagerFactory newEntityManagerFactory(String
unitName, ClassLoader classLoader) {
+ return null;
+ }
+
+}
Propchange:
incubator/tuscany/java/sca/services/persistence/common/src/main/java/org/apache/tuscany/service/persistence/common/EmfBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/services/persistence/common/src/main/java/org/apache/tuscany/service/persistence/common/EmfBuilder.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]