Added: geronimo/server/branches/2.1/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java?rev=1032500&view=auto
==============================================================================
--- geronimo/server/branches/2.1/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java (added)
+++ geronimo/server/branches/2.1/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java Mon Nov 8 09:11:36 2010
@@ -0,0 +1,799 @@
+/**
+ * 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.geronimo.derby;
+
+import java.util.Date;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.kernel.DependencyManager;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.NoSuchAttributeException;
+import org.apache.geronimo.kernel.NoSuchOperationException;
+import org.apache.geronimo.kernel.lifecycle.LifecycleMonitor;
+import org.apache.geronimo.kernel.proxy.ProxyManager;
+
+/**
+ *
+ *
+ * @version $Rev$ $Date$
+ */
+public class MockKernel implements Kernel{
+
+ private static final String DERBYNETWORK_GBEAN_NAME = "DerbyNetwork";
+ private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME = "userName";
+ private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERPASSWORD = "userPassword";
+
+ /*
+ * Mock implementation for test purpose
+ */
+ public Object getAttribute(String shortName, String attributeName) throws GBeanNotFoundException,
+ NoSuchAttributeException, Exception {
+
+ if (DERBYNETWORK_GBEAN_NAME.equals(shortName)) {
+
+ if (DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME.equals(attributeName)) {
+ return new String("dbadmin");
+ } else if (DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME.equals(attributeName)) {
+ return new String ("manager");
+ }
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#boot()
+ */
+ public void boot() throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getAbstractNameFor(java.lang.Object)
+ */
+ public AbstractName getAbstractNameFor(Object service) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getAttribute(org.apache.geronimo.gbean.AbstractName, java.lang.String)
+ */
+ public Object getAttribute(AbstractName name, String attributeName) throws GBeanNotFoundException,
+ NoSuchAttributeException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getAttribute(java.lang.Class, java.lang.String)
+ */
+ public Object getAttribute(Class type, String attributeName) throws GBeanNotFoundException,
+ NoSuchAttributeException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getAttribute(java.lang.String, java.lang.Class, java.lang.String)
+ */
+ public Object getAttribute(String shortName, Class type, String attributeName) throws GBeanNotFoundException,
+ NoSuchAttributeException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getAttribute(javax.management.ObjectName, java.lang.String)
+ */
+ public Object getAttribute(ObjectName name, String attributeName) throws GBeanNotFoundException,
+ NoSuchAttributeException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getBootTime()
+ */
+ public Date getBootTime() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getClassLoaderFor(org.apache.geronimo.gbean.AbstractName)
+ */
+ public ClassLoader getClassLoaderFor(AbstractName name) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getClassLoaderFor(java.lang.String)
+ */
+ public ClassLoader getClassLoaderFor(String shortName) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getClassLoaderFor(java.lang.Class)
+ */
+ public ClassLoader getClassLoaderFor(Class type) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getClassLoaderFor(java.lang.String, java.lang.Class)
+ */
+ public ClassLoader getClassLoaderFor(String shortName, Class type) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getDependencyManager()
+ */
+ public DependencyManager getDependencyManager() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBean(org.apache.geronimo.gbean.AbstractName)
+ */
+ public Object getGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBean(java.lang.String)
+ */
+ public Object getGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBean(java.lang.Class)
+ */
+ public Object getGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBean(java.lang.String, java.lang.Class)
+ */
+ public Object getGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBean(javax.management.ObjectName)
+ */
+ public Object getGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanData(org.apache.geronimo.gbean.AbstractName)
+ */
+ public GBeanData getGBeanData(AbstractName name) throws GBeanNotFoundException, InternalKernelException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanData(java.lang.String)
+ */
+ public GBeanData getGBeanData(String shortName) throws GBeanNotFoundException, InternalKernelException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanData(java.lang.Class)
+ */
+ public GBeanData getGBeanData(Class type) throws GBeanNotFoundException, InternalKernelException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanData(java.lang.String, java.lang.Class)
+ */
+ public GBeanData getGBeanData(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(org.apache.geronimo.gbean.AbstractName)
+ */
+ public GBeanInfo getGBeanInfo(AbstractName name) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(java.lang.String)
+ */
+ public GBeanInfo getGBeanInfo(String shortName) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(java.lang.Class)
+ */
+ public GBeanInfo getGBeanInfo(Class type) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(java.lang.String, java.lang.Class)
+ */
+ public GBeanInfo getGBeanInfo(String shortName, Class type) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(javax.management.ObjectName)
+ */
+ public GBeanInfo getGBeanInfo(ObjectName name) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanStartTime(org.apache.geronimo.gbean.AbstractName)
+ */
+ public long getGBeanStartTime(AbstractName name) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanStartTime(java.lang.String)
+ */
+ public long getGBeanStartTime(String shortName) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanStartTime(java.lang.Class)
+ */
+ public long getGBeanStartTime(Class type) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanStartTime(java.lang.String, java.lang.Class)
+ */
+ public long getGBeanStartTime(String shortName, Class type) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanState(org.apache.geronimo.gbean.AbstractName)
+ */
+ public int getGBeanState(AbstractName name) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanState(java.lang.String)
+ */
+ public int getGBeanState(String shortName) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanState(java.lang.Class)
+ */
+ public int getGBeanState(Class type) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanState(java.lang.String, java.lang.Class)
+ */
+ public int getGBeanState(String shortName, Class type) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getGBeanState(javax.management.ObjectName)
+ */
+ public int getGBeanState(ObjectName name) throws GBeanNotFoundException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getKernelName()
+ */
+ public String getKernelName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getLifecycleMonitor()
+ */
+ public LifecycleMonitor getLifecycleMonitor() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getNaming()
+ */
+ public Naming getNaming() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getProxyManager()
+ */
+ public ProxyManager getProxyManager() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getShortNameFor(java.lang.Object)
+ */
+ public String getShortNameFor(Object service) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#getStateReason(org.apache.geronimo.gbean.AbstractName)
+ */
+ public String getStateReason(AbstractName abstractName) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(org.apache.geronimo.gbean.AbstractName, java.lang.String)
+ */
+ public Object invoke(AbstractName name, String methodName) throws GBeanNotFoundException, NoSuchOperationException,
+ InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.String, java.lang.String)
+ */
+ public Object invoke(String shortName, String methodName) throws GBeanNotFoundException, NoSuchOperationException,
+ InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.Class, java.lang.String)
+ */
+ public Object invoke(Class type, String methodName) throws GBeanNotFoundException, NoSuchOperationException,
+ InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.String, java.lang.Class, java.lang.String)
+ */
+ public Object invoke(String shortName, Class type, String methodName) throws GBeanNotFoundException,
+ NoSuchOperationException, InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(org.apache.geronimo.gbean.AbstractName, java.lang.String, java.lang.Object[], java.lang.String[])
+ */
+ public Object invoke(AbstractName name, String methodName, Object[] args, String[] types)
+ throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.String, java.lang.String, java.lang.Object[], java.lang.String[])
+ */
+ public Object invoke(String shortName, String methodName, Object[] args, String[] types)
+ throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.Class, java.lang.String, java.lang.Object[], java.lang.String[])
+ */
+ public Object invoke(Class type, String methodName, Object[] args, String[] types) throws GBeanNotFoundException,
+ NoSuchOperationException, InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.String, java.lang.Class, java.lang.String, java.lang.Object[], java.lang.String[])
+ */
+ public Object invoke(String shortName, Class type, String methodName, Object[] args, String[] types)
+ throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(javax.management.ObjectName, java.lang.String)
+ */
+ public Object invoke(ObjectName name, String methodName) throws GBeanNotFoundException, NoSuchOperationException,
+ InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[])
+ */
+ public Object invoke(ObjectName name, String methodName, Object[] args, String[] types)
+ throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isLoaded(org.apache.geronimo.gbean.AbstractName)
+ */
+ public boolean isLoaded(AbstractName name) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isLoaded(java.lang.String)
+ */
+ public boolean isLoaded(String shortName) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isLoaded(java.lang.Class)
+ */
+ public boolean isLoaded(Class type) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isLoaded(java.lang.String, java.lang.Class)
+ */
+ public boolean isLoaded(String shortName, Class type) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isRunning(org.apache.geronimo.gbean.AbstractName)
+ */
+ public boolean isRunning(AbstractName name) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isRunning(java.lang.String)
+ */
+ public boolean isRunning(String shortName) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isRunning(java.lang.Class)
+ */
+ public boolean isRunning(Class type) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isRunning(java.lang.String, java.lang.Class)
+ */
+ public boolean isRunning(String shortName, Class type) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#isRunning()
+ */
+ public boolean isRunning() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#listGBeans(org.apache.geronimo.gbean.AbstractNameQuery)
+ */
+ public Set listGBeans(AbstractNameQuery abstractNameQuery) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#listGBeans(java.util.Set)
+ */
+ public Set listGBeans(Set abstractNameQueries) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#listGBeans(javax.management.ObjectName)
+ */
+ public Set listGBeans(ObjectName pattern) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#loadGBean(org.apache.geronimo.gbean.GBeanData, java.lang.ClassLoader)
+ */
+ public void loadGBean(GBeanData gbeanData, ClassLoader classLoader) throws GBeanAlreadyExistsException,
+ InternalKernelException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#registerShutdownHook(java.lang.Runnable)
+ */
+ public void registerShutdownHook(Runnable hook) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#setAttribute(org.apache.geronimo.gbean.AbstractName, java.lang.String, java.lang.Object)
+ */
+ public void setAttribute(AbstractName name, String attributeName, Object attributeValue)
+ throws GBeanNotFoundException, NoSuchAttributeException, Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#setAttribute(java.lang.String, java.lang.String, java.lang.Object)
+ */
+ public void setAttribute(String shortName, String attributeName, Object attributeValue)
+ throws GBeanNotFoundException, NoSuchAttributeException, Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#setAttribute(java.lang.Class, java.lang.String, java.lang.Object)
+ */
+ public void setAttribute(Class type, String attributeName, Object attributeValue) throws GBeanNotFoundException,
+ NoSuchAttributeException, Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#setAttribute(java.lang.String, java.lang.Class, java.lang.String, java.lang.Object)
+ */
+ public void setAttribute(String shortName, Class type, String attributeName, Object attributeValue)
+ throws GBeanNotFoundException, NoSuchAttributeException, Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#shutdown()
+ */
+ public void shutdown() {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#startGBean(org.apache.geronimo.gbean.AbstractName)
+ */
+ public void startGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#startGBean(java.lang.String)
+ */
+ public void startGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#startGBean(java.lang.Class)
+ */
+ public void startGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#startGBean(java.lang.String, java.lang.Class)
+ */
+ public void startGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#startRecursiveGBean(org.apache.geronimo.gbean.AbstractName)
+ */
+ public void startRecursiveGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#startRecursiveGBean(java.lang.String)
+ */
+ public void startRecursiveGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#startRecursiveGBean(java.lang.Class)
+ */
+ public void startRecursiveGBean(Class type) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#startRecursiveGBean(java.lang.String, java.lang.Class)
+ */
+ public void startRecursiveGBean(String shortName, Class type) throws GBeanNotFoundException,
+ InternalKernelException, IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#stopGBean(org.apache.geronimo.gbean.AbstractName)
+ */
+ public void stopGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#stopGBean(java.lang.String)
+ */
+ public void stopGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#stopGBean(java.lang.Class)
+ */
+ public void stopGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#stopGBean(java.lang.String, java.lang.Class)
+ */
+ public void stopGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#unloadGBean(org.apache.geronimo.gbean.AbstractName)
+ */
+ public void unloadGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#unloadGBean(java.lang.String)
+ */
+ public void unloadGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#unloadGBean(java.lang.Class)
+ */
+ public void unloadGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#unloadGBean(java.lang.String, java.lang.Class)
+ */
+ public void unloadGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.kernel.Kernel#unregisterShutdownHook(java.lang.Runnable)
+ */
+ public void unregisterShutdownHook(Runnable hook) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Propchange: geronimo/server/branches/2.1/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.1/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.1/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/server/branches/2.1/plugins/derby/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/derby/pom.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/derby/pom.xml (original)
+++ geronimo/server/branches/2.1/plugins/derby/pom.xml Mon Nov 8 09:11:36 2010
@@ -1,4 +1,4 @@
-
+
-
+
@@ -27,60 +27,18 @@
plugins
2.1.7-SNAPSHOT
-
- org.apache.geronimo.configs
+
derby
Geronimo Plugins, Derby
- car
+ pom
- Geronimo module that supplies the Derby runtime in a single classloader.
+ Derby plugin
-
-
- org.apache.geronimo.framework
- geronimo-gbean-deployer
- ${version}
- car
- provided
-
-
-
- org.apache.derby
- derby
-
-
-
- org.apache.derby
- derbyclient
-
-
-
- org.apache.derby
- derbynet
-
-
-
- org.apache.derby
- derbytools
-
-
-
-
-
-
- org.apache.geronimo.buildsupport
- car-maven-plugin
-
-
- true
- true
-
- Geronimo Core
-
-
-
-
+
+ geronimo-derby
+ derby
+
Modified: geronimo/server/branches/2.1/plugins/monitoring/agent-ds/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/monitoring/agent-ds/src/main/plan/plan.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/monitoring/agent-ds/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.1/plugins/monitoring/agent-ds/src/main/plan/plan.xml Mon Nov 8 09:11:36 2010
@@ -27,8 +27,8 @@
jdbc/ActiveDS
true
- monitor
- monitor
+ manager
+ dbadmin
ActiveMRCDB
@@ -46,8 +46,8 @@
jdbc/ArchiveDS
true
- monitor
- monitor
+ manager
+ dbadmin
ArchiveMRCDB
Modified: geronimo/server/branches/2.1/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.1/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml Mon Nov 8 09:11:36 2010
@@ -42,7 +42,8 @@
MonitoringClientDS
true
- app
+ manager
+ dbadmin
MonitoringClientDB
Modified: geronimo/server/branches/2.1/plugins/system-database/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/pom.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/pom.xml (original)
+++ geronimo/server/branches/2.1/plugins/system-database/pom.xml Mon Nov 8 09:11:36 2010
@@ -45,7 +45,7 @@
- geronimo-derby
+
geronimo-timer
system-database
sysdb-portlets
Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-console-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-console-jetty/pom.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-console-jetty/pom.xml (original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-console-jetty/pom.xml Mon Nov 8 09:11:36 2010
@@ -124,12 +124,6 @@
org.apache.geronimo.modules
- geronimo-derby
- ${version}
-
-
-
- org.apache.geronimo.modules
geronimo-test-ddbean
${version}
Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-console-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-console-tomcat/pom.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-console-tomcat/pom.xml (original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-console-tomcat/pom.xml Mon Nov 8 09:11:36 2010
@@ -124,12 +124,6 @@
org.apache.geronimo.modules
- geronimo-derby
- ${version}
-
-
-
- org.apache.geronimo.modules
geronimo-test-ddbean
${version}
Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java (original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java Mon Nov 8 09:11:36 2010
@@ -137,9 +137,9 @@ public class DBViewerPortlet extends Bas
if (LISTTBLS_ACTION.equals(action)) {
renderRequest.setAttribute("db", db);
renderRequest.setAttribute("viewTables", viewTables);
- renderRequest.setAttribute("ds", DerbyConnectionUtil
- .getDataSourceForDataBaseName(db));
-
+ renderRequest.setAttribute("ds", DerbyConnectionUtil.getDataSourceForDataBaseName(db));
+ renderRequest.setAttribute("userName", DerbyConnectionUtil.getDerbyConnectionUsername());
+ renderRequest.setAttribute("userPassword", DerbyConnectionUtil.getDerbyConnectionUserPassword());
if (WindowState.NORMAL.equals(renderRequest.getWindowState())) {
listTablesView.include(renderRequest, renderResponse);
} else {
@@ -149,12 +149,13 @@ public class DBViewerPortlet extends Bas
renderRequest.setAttribute("db", db);
renderRequest.setAttribute("tbl", tbl);
renderRequest.setAttribute("viewTables", viewTables);
- renderRequest.setAttribute("ds", DerbyConnectionUtil
- .getDataSourceForDataBaseName(db));
+ renderRequest.setAttribute("ds", DerbyConnectionUtil.getDataSourceForDataBaseName(db));
+ renderRequest.setAttribute("userName", DerbyConnectionUtil.getDerbyConnectionUsername());
+ renderRequest.setAttribute("userPassword", DerbyConnectionUtil.getDerbyConnectionUserPassword());
if (WindowState.NORMAL.equals(renderRequest.getWindowState())) {
- viewTableContentsView.include(renderRequest, renderResponse);
+ viewTableContentsView.include(renderRequest, renderResponse);
} else {
- viewTableContentsMaximizedView.include(renderRequest, renderResponse);
+ viewTableContentsMaximizedView.include(renderRequest, renderResponse);
}
} else {
renderRequest.setAttribute("databases", helper
Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java (original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java Mon Nov 8 09:11:36 2010
@@ -28,12 +28,15 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.geronimo.console.util.KernelManagementHelper;
import org.apache.geronimo.console.util.ManagementHelper;
+import org.apache.geronimo.console.util.PortletManager;
import org.apache.geronimo.derby.DerbySystemGBean;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.gbean.AbstractNameQuery;
import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
import org.apache.geronimo.kernel.Kernel;
import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.NoSuchAttributeException;
import org.apache.geronimo.management.JCAManagedConnectionFactory;
import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
@@ -68,6 +71,13 @@ public class DerbyConnectionUtil {
private static AbstractName SYSTEM_DATASOURCE_NAME = null;
+ private static final String DERBYNETWORK_GBEAN_NAME = "DerbyNetwork";
+
+ private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME = "userName";
+
+ private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERPASSWORD = "userPassword";
+
+
static {
try {
log.debug("Looking up system datasource name...");
@@ -120,7 +130,7 @@ public class DerbyConnectionUtil {
*
* @param dbName
* @return
- * @throws SQLException
+ * @throws SQLException
*/
private static Connection getConnection(String dbName, String properties,
String protocol, String driver) throws SQLException {
@@ -134,11 +144,41 @@ public class DerbyConnectionUtil {
if (SYSTEM_DB.equalsIgnoreCase(dbName)) {
return getSystemDBConnection();
} else {
- return DriverManager.getConnection(protocol + dbName + properties);
+ String userName = getDerbyConnectionUsername();
+ String password = getDerbyConnectionUserPassword();
+ return DriverManager.getConnection(protocol + dbName + properties + ";user=" + userName + ";password="
+ + password);
}
}
/**
+ * Get user name of Derby connection
+ */
+
+ public static String getDerbyConnectionUsername() {
+
+ try {
+ return (String) PortletManager.getKernel().getAttribute(DERBYNETWORK_GBEAN_NAME,
+ DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ /**
+ * Get user password of Derby connection
+ */
+
+ public static String getDerbyConnectionUserPassword() {
+ try {
+ return (String) PortletManager.getKernel().getAttribute(DERBYNETWORK_GBEAN_NAME,
+ DERBYNETWORK_GBEAN_ATTRIBUTE_USERPASSWORD);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ /**
* Get a connection to derby.
*
* @param dbName
Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java (original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java Mon Nov 8 09:11:36 2010
@@ -133,6 +133,8 @@ public class RunSQLPortlet extends BaseP
}
renderRequest.setAttribute("singleSelectStmt", singleSelectStmt);
renderRequest.setAttribute("ds", DerbyConnectionUtil.getDataSource(useDB));
+ renderRequest.setAttribute("userName", DerbyConnectionUtil.getDerbyConnectionUsername());
+ renderRequest.setAttribute("userPassword", DerbyConnectionUtil.getDerbyConnectionUserPassword());
}
if ((action != null) && (action.trim().length() > 0)) {
//set action to null so that subsequent renders of portlet
Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp (original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp Mon Nov 8 09:11:36 2010
@@ -30,8 +30,8 @@
var="ds"
driver="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:${db};create=true"
- user=""
- password=""
+ user="${userName}"
+ password="${userPassword}"
/>
Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp (original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp Mon Nov 8 09:11:36 2010
@@ -139,8 +139,8 @@ function validateFor
var="ds"
driver="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:${useDB};create=true"
- user=""
- password=""
+ user="${userName}"
+ password="${userPassword}"
/>
Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/viewTableContents.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/viewTableContents.jsp?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/viewTableContents.jsp (original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/viewTableContents.jsp Mon Nov 8 09:11:36 2010
@@ -30,8 +30,8 @@
var="ds"
driver="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:${db};create=true"
- user=""
- password=""
+ user="${userName}"
+ password="${userPassword}"
/>
Modified: geronimo/server/branches/2.1/plugins/system-database/system-database/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/system-database/pom.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/system-database/pom.xml (original)
+++ geronimo/server/branches/2.1/plugins/system-database/system-database/pom.xml Mon Nov 8 09:11:36 2010
@@ -62,12 +62,6 @@
org.apache.geronimo.modules
- geronimo-derby
- ${version}
-
-
-
- org.apache.geronimo.modules
geronimo-timer
${version}
@@ -120,6 +114,8 @@
#{ServerHostname}
#{DerbyPort + PortOffset}
+ dbadmin
+ manager
1527
Modified: geronimo/server/branches/2.1/plugins/system-database/system-database/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/system-database/src/main/plan/plan.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/system-database/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.1/plugins/system-database/system-database/src/main/plan/plan.xml Mon Nov 8 09:11:36 2010
@@ -26,8 +26,8 @@
javax.sql.DataSource
SystemDatasource
-
-
+ dbadmin
+ manager
SystemDatabase
true
@@ -43,8 +43,8 @@
NoTxDatasource
-
-
+ dbadmin
+ manager
SystemDatabase
true
@@ -59,7 +59,7 @@
-
+
ServerInfo
var/derby
@@ -69,6 +69,8 @@
DerbySystem
localhost
1527
+ dbadmin
+ manager
@@ -96,6 +98,5 @@
SystemDatasource
DefaultThreadPool
DerbySystem
-
-
+
Modified: geronimo/server/branches/2.1/plugins/uddi/geronimo-uddi-db/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/uddi/geronimo-uddi-db/pom.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/uddi/geronimo-uddi-db/pom.xml (original)
+++ geronimo/server/branches/2.1/plugins/uddi/geronimo-uddi-db/pom.xml Mon Nov 8 09:11:36 2010
@@ -79,7 +79,7 @@
org.apache.derby.jdbc.EmbeddedDriver
- jdbc:derby:${derby.system.home}/UddiDatabase;create=true
+ jdbc:derby:${derby.system.home}/UddiDatabase;create=true;user=dbadmin;password=manager
true
abort
;
Modified: geronimo/server/branches/2.1/plugins/uddi/uddi-server/uddi-jetty6/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/uddi/uddi-server/uddi-jetty6/src/main/plan/plan.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/uddi/uddi-server/uddi-jetty6/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.1/plugins/uddi/uddi-server/uddi-jetty6/src/main/plan/plan.xml Mon Nov 8 09:11:36 2010
@@ -54,8 +54,8 @@
javax.sql.DataSource
jdbc/juddiDB
-
-
+ dbadmin
+ manager
UddiDatabase
false
Modified: geronimo/server/branches/2.1/plugins/uddi/uddi-server/uddi-tomcat/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/uddi/uddi-server/uddi-tomcat/src/main/plan/plan.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/uddi/uddi-server/uddi-tomcat/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.1/plugins/uddi/uddi-server/uddi-tomcat/src/main/plan/plan.xml Mon Nov 8 09:11:36 2010
@@ -55,8 +55,8 @@
javax.sql.DataSource
jdbc/juddiDB
-
-
+ dbadmin
+ manager
UddiDatabase
false
Modified: geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/main/resources/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/main/resources/META-INF/geronimo-application.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/main/resources/META-INF/geronimo-application.xml (original)
+++ geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/main/resources/META-INF/geronimo-application.xml Mon Nov 8 09:11:36 2010
@@ -65,7 +65,7 @@
configuredsecurityds
- system
+ dbadmin
manager
TestDatabase
true
@@ -151,11 +151,11 @@
test
org.apache.geronimo.security.credentialstore.NameCallbackHandler
- george
+ dbadmin
org.apache.geronimo.security.credentialstore.PasswordCallbackHandler
- bone
+ manager
Modified: geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/test/java/org/apache/geronimo/testsuite/jcacms/CmsTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/test/java/org/apache/geronimo/testsuite/jcacms/CmsTest.java?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/test/java/org/apache/geronimo/testsuite/jcacms/CmsTest.java (original)
+++ geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/test/java/org/apache/geronimo/testsuite/jcacms/CmsTest.java Mon Nov 8 09:11:36 2010
@@ -35,7 +35,7 @@ public class CmsTest
public void testPageContent1() throws Exception {
selenium.open("http://localhost:8080/jca-cms/default-subject-servlet");
selenium.waitForPageToLoad("30000");
-
+
String body = selenium.getText("xpath=/html/body");
assertTrue(body.endsWith(
@@ -51,11 +51,13 @@ public class CmsTest
// "\tPrincipal: org.apache.geronimo.security.IdentificationPrincipal[[1186174499146:0x7622e0831ed59a4cd6c277a53491de74f1489311]]\n" +
// "\tPrivate Credential: javax.resource.spi.security.PasswordCredential@23f33e5c\n" +
// "\n" +
- "Successfully got configured connection\n" +
- "\n" +
- "Successfully got container managed connection"));
+ "Successfully got configured connection"
+// +
+// "\n" +
+// "Successfully got container managed connection"
+ ));
- String expectedPrincipal = "Principal: george";
+ String expectedPrincipal = "Principal: dbadmin";
int pos1 = body.indexOf(expectedPrincipal);
assertTrue("Expected current subject principal", pos1 > 0);
int pos2 = body.indexOf(expectedPrincipal, pos1 + expectedPrincipal.length());
@@ -66,15 +68,17 @@ public class CmsTest
public void testPageContent2() throws Exception {
selenium.open("http://localhost:8080/jca-cms/run-as-servlet");
selenium.waitForPageToLoad("30000");
-
+
String body = selenium.getText("xpath=/html/body");
assertTrue(body.endsWith(
- "Successfully got configured connection\n" +
- "\n" +
- "Successfully got container managed connection"));
+ "Successfully got configured connection"
+// +
+// "\n" +
+// "Successfully got container managed connection"
+ ));
- String expectedPrincipal = "Principal: george";
+ String expectedPrincipal = "Principal: dbadmin";
int pos1 = body.indexOf(expectedPrincipal);
assertTrue("Expected current subject principal", pos1 > 0);
int pos2 = body.indexOf("Principal: gracie", pos1 + expectedPrincipal.length());
Modified: geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-war/src/main/java/org/apache/geronimo/itest/TestServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-war/src/main/java/org/apache/geronimo/itest/TestServlet.java?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-war/src/main/java/org/apache/geronimo/itest/TestServlet.java (original)
+++ geronimo/server/branches/2.1/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-war/src/main/java/org/apache/geronimo/itest/TestServlet.java Mon Nov 8 09:11:36 2010
@@ -43,8 +43,8 @@ public class TestServlet extends HttpSer
@Resource(name="configuredsecurityds")
private DataSource csds;
- @Resource(name="cmsds")
- private DataSource cmsds;
+// @Resource(name="cmsds")
+// private DataSource cmsds;
public void init() {
System.out.println("Test Servlet init");
@@ -70,6 +70,7 @@ public class TestServlet extends HttpSer
out.println("Could not get configured connection");
e.printStackTrace(out);
}
+ /*
//now get a connection through the configured default subject
if (cmsds == null) {
out.println("No container managed datasource found");
@@ -95,6 +96,7 @@ public class TestServlet extends HttpSer
out.println("Could not get container managed connection");
e.printStackTrace(out);
}
+ */
}
Modified: geronimo/server/branches/2.1/testsuite/security-testsuite/test-security/src/test/java/org/apache/geronimo/testsuite/security/TestSecurity.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/security-testsuite/test-security/src/test/java/org/apache/geronimo/testsuite/security/TestSecurity.java?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/security-testsuite/test-security/src/test/java/org/apache/geronimo/testsuite/security/TestSecurity.java (original)
+++ geronimo/server/branches/2.1/testsuite/security-testsuite/test-security/src/test/java/org/apache/geronimo/testsuite/security/TestSecurity.java Mon Nov 8 09:11:36 2010
@@ -25,7 +25,7 @@ import org.testng.annotations.Test;
public class TestSecurity extends SeleniumTestSupport {
- @Test
+ @Test (dependsOnGroups = { "failure" }, alwaysRun=true )
public void testLogin() throws Exception {
selenium.open("/demo/protect/hello.html");
selenium.type("j_username", "george");
@@ -36,38 +36,39 @@ public class TestSecurity extends Seleni
assertEquals("hello world.", selenium.getText("xpath=/html"));
}
- @Test
+ @Test (groups = { "failure" })
public void testBadPasswordLogin() throws Exception {
testFailure("george", "bonee");
}
- @Test
+ @Test (groups = { "failure" })
public void testBadUser() throws Exception {
testFailure("doesnotexist", "bonee");
}
- @Test
+ @Test (groups = { "failure" })
public void testNullPasswordLogin() throws Exception {
testFailure("george", null);
}
- @Test
+ @Test (groups = { "failure" })
public void testNullUserLogin() throws Exception {
testFailure(null, "bone");
}
- @Test
+ @Test (groups = { "failure" })
public void testNullCredentialsLogin() throws Exception {
testFailure(null, null);
}
- @Test
+ @Test (groups = { "failure" })
public void testEmptyCredentialsLogin() throws Exception {
testFailure("", "");
}
private void testFailure(String username, String password) throws Exception {
selenium.open("/demo/protect/hello.html");
+
if (username != null) {
selenium.type("j_username", username);
}
Modified: geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.3/test-rar-j2ee_1.3/src/main/rar/META-INF/geronimo-ra.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.3/test-rar-j2ee_1.3/src/main/rar/META-INF/geronimo-ra.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.3/test-rar-j2ee_1.3/src/main/rar/META-INF/geronimo-ra.xml (original)
+++ geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.3/test-rar-j2ee_1.3/src/main/rar/META-INF/geronimo-ra.xml Mon Nov 8 09:11:36 2010
@@ -38,10 +38,10 @@
javax.sql.DataSource
RARDBDatasource-1_3
-
+ dbadmin
+ manager
DefaultDB-1_3
-
Modified: geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.4/test-rar-j2ee_1.4/src/main/rar/META-INF/geronimo-ra.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.4/test-rar-j2ee_1.4/src/main/rar/META-INF/geronimo-ra.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.4/test-rar-j2ee_1.4/src/main/rar/META-INF/geronimo-ra.xml (original)
+++ geronimo/server/branches/2.1/testsupport/test-deployment-j2ee_1.4/test-rar-j2ee_1.4/src/main/rar/META-INF/geronimo-ra.xml Mon Nov 8 09:11:36 2010
@@ -38,10 +38,10 @@
javax.sql.DataSource
RARDBDatasource-1_4
-
+ dbadmin
+ manager
DefaultDB-1_4
-
Modified: geronimo/server/branches/2.1/testsupport/test-deployment-javaee_5/test-rar-javaee_5/src/main/rar/META-INF/geronimo-ra.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsupport/test-deployment-javaee_5/test-rar-javaee_5/src/main/rar/META-INF/geronimo-ra.xml?rev=1032500&r1=1032499&r2=1032500&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsupport/test-deployment-javaee_5/test-rar-javaee_5/src/main/rar/META-INF/geronimo-ra.xml (original)
+++ geronimo/server/branches/2.1/testsupport/test-deployment-javaee_5/test-rar-javaee_5/src/main/rar/META-INF/geronimo-ra.xml Mon Nov 8 09:11:36 2010
@@ -38,10 +38,10 @@
javax.sql.DataSource
RARDBDatasource-1_4
-
+ dbadmin
+ manager
- DefaultDB-1_4
-
+ DefaultDB-1_4