Author: chathura
Date: Sun Dec 30 22:39:35 2007
New Revision: 11712
Log:
Changed Registry servlet to start with the JDBCRegistry impl instead of
RemoteRegistry impl.
I think we should make this configurable using the registry.xml
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/servlet/RegistryServlet.java
trunk/registry/modules/core/src/test/java/org/wso2/registry/jdbc/JDBCRegistryTest.java
trunk/registry/modules/webapps/src/main/webapp/admin/header.jsp
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/servlet/RegistryServlet.java
==============================================================================
---
trunk/registry/modules/core/src/main/java/org/wso2/registry/servlet/RegistryServlet.java
(original)
+++
trunk/registry/modules/core/src/main/java/org/wso2/registry/servlet/RegistryServlet.java
Sun Dec 30 22:39:35 2007
@@ -117,13 +117,17 @@
coreRegistry,
registryRealm);
- try {
- RemoteRegistry remote = new RemoteRegistry(new
URL("http://localhost:8080/wso2registry/atom"));
-
config.getServletContext().setAttribute(RegistryConstants.REGISTRY, remote);
- } catch (MalformedURLException e) {
-
config.getServletContext().setAttribute(RegistryConstants.REGISTRY,
coreRegistry);
- e.printStackTrace();
- }
+ // todo: we should make this decision according to the
registry.xml or web.xml config
+ //try {
+ // RemoteRegistry remote = new RemoteRegistry(new
URL("http://localhost:8080/wso2registry/atom"));
+ //
config.getServletContext().setAttribute(RegistryConstants.REGISTRY, remote);
+ //} catch (MalformedURLException e) {
+ //
config.getServletContext().setAttribute(RegistryConstants.REGISTRY,
coreRegistry);
+ // e.printStackTrace();
+ //}
+
+
config.getServletContext().setAttribute(RegistryConstants.REGISTRY,
coreRegistry);
+
config.getServletContext()
.setAttribute(RegistryConstants.REGISTRY_REALM,
registryRealm);
System.getProperties().put(RegistryConstants.REGISTRY,
coreRegistry);
Modified:
trunk/registry/modules/core/src/test/java/org/wso2/registry/jdbc/JDBCRegistryTest.java
==============================================================================
---
trunk/registry/modules/core/src/test/java/org/wso2/registry/jdbc/JDBCRegistryTest.java
(original)
+++
trunk/registry/modules/core/src/test/java/org/wso2/registry/jdbc/JDBCRegistryTest.java
Sun Dec 30 22:39:35 2007
@@ -52,25 +52,6 @@
}
}
- public void dummyTest() {
-
- try {
- RegistryDataSource dataSource = new RegistryDataSource(
-
"jdbc:hsqldb:file:/home/chathura/temp/sample/sample-db;shutdown=true",
"org.hsqldb.jdbcDriver", "sa", "");
-
- DBUtils dbUtils = new DBUtils();
- Connection conn = dataSource.getConnection();
- dbUtils.initializeDatabase(conn);
- conn.close();
-
- HSQLDBInitializer dbInitializer = new HSQLDBInitializer();
- dbInitializer.createHSQLTables(dataSource);
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
public void testFlatResourceHandling() {
Resource r1 = new Resource();
r1.setAuthorUserName("Chathura");
Modified: trunk/registry/modules/webapps/src/main/webapp/admin/header.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/header.jsp
(original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/header.jsp Sun Dec
30 22:39:35 2007
@@ -1,10 +1,10 @@
<%@ page import="org.wso2.registry.RegistryConstants" %>
<%@ page import="org.wso2.registry.web.UIConstants" %>
<div class="popup-main" id="popup-main" style="display:none;">
-
+
</div>
<div class="popup" id="popup" style="display:none;">
-
+
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%;border-bottom:solid 1px #989898;">
<tr>
<td align="left" style="width:8px;"><img
src="/wso2registry/admin/images/login-box-left.gif" /></td>
@@ -12,10 +12,10 @@
<td align="right"
style="padding-right:0px;width:8px;"><img
src="/wso2registry/admin/images/login-box-right.gif" /></td>
</tr>
</table>
-
-
+
+
<div class="popup-bot">
-
+
<form action="/wso2registry/system/signin" method="post">
<table class="form-table" border="0" cellspacing="0"
cellpadding="0" style=" width:100%">
<tr>
@@ -32,11 +32,11 @@
<input id="signin" type="submit" class="button"
value="Sign In"/> <input type="button" class="button" value="Cancel"
onclick="showHideCommon('popup-main'); showHideCommon('popup');"
style="margin-left:10px;" />
</td>
</tr>
-
+
</table>
</form>
-
-
+
+
</div>
</div>
@@ -67,13 +67,13 @@
<tr>
<td valign="top" ><img
src="/wso2registry/admin/images/logo.jpg" style="margin:0px padding:0px;"/></td>
<td align="right" style="padding-top:5px;">
-
+
<table cellpadding="0" cellspacing="0"
border="0" class="search-table">
<tr>
<td>
<a
href="/wso2registry/system/search/advanced/new"
class="advanced-search">Advanced Search <img
src="/wso2registry/admin/images/icon-go.gif" border="0" /></a>
</td>
-
+
<form
action="/wso2registry/system/search" method="get" style="display:inline;"
name="searchForm">
<td>
<input
type="text" name="criteria" class="input-text" />
@@ -88,7 +88,7 @@
<table cellpadding="0" cellspacing="0"
border="0" class="top-menu-table">
<tr>
<td>
-
+
<%
if
(!userName.equals(RegistryConstants.ANONYMOUS_USER)) {%>
<span>
<script language="javascript"
type="text/javascript">doGreeting();</script></span> <%=userName%>!
@@ -113,8 +113,8 @@
</td>
<% } %>
<td class="top-menu">
- <a
href="http://wso2.org/wiki/display/registry/Home" target="_blank">
- <img
src="/wso2registry/admin/images/help.gif" border="0" align="top" /> Wiki
+ <a
href="http://wso2.org/wiki/display/registry/User+guide" target="_blank">
+ <img
src="/wso2registry/admin/images/help.gif" border="0" align="top" /> Help
</a>
</td>
<!--Add this after figuring out a better way to do
the config-->
@@ -136,15 +136,15 @@
<a
href="/wso2registry/system/signout">
<img
src="/wso2registry/admin/images/icon-logout.gif" border="0" align="top" />
Sign out
</a>
-
+
<% } %>
-
+
</td>
<td align="right"
style="padding-right:0px;"><img src="/wso2registry/admin/images/menu-right.jpg"
/></td>
</tr>
</table>
</td>
- </tr>
+ </tr>
</table>
</div>
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev