Subversion Repositories XServices

Compare Revisions

No changes between revisions

Ignore whitespace Rev 101 → Rev 123

/xservices/tags/20130205r/web/WEB-INF/JCSAdmin.jsp
0,0 → 1,319
<%--
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.
--%>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="org.apache.jcs.admin.*" %>
<%@ page import="org.apache.jcs.*" %>
 
<jsp:useBean id="jcsBean" scope="request" class="org.apache.jcs.admin.JCSAdminBean" />
 
<html>
 
<head>
 
<SCRIPT LANGUAGE="Javascript">
function decision( message, url )
{
if( confirm(message) )
{
location.href = url;
}
}
</SCRIPT>
 
<title> JCS Admin Servlet </title>
 
</head>
 
<body>
 
<%
String CACHE_NAME_PARAM = "cacheName";
String ACTION_PARAM = "action";
String CLEAR_ALL_REGIONS_ACTION = "clearAllRegions";
String CLEAR_REGION_ACTION = "clearRegion";
String REMOVE_ACTION = "remove";
String DETAIL_ACTION = "detail";
String REGION_SUMMARY_ACTION = "regionSummary";
String ITEM_ACTION = "item";
String KEY_PARAM = "key";
String SILENT_PARAM = "silent";
 
String DEFAULT_TEMPLATE_NAME = "DEFAULT";
String REGION_DETAIL_TEMPLATE_NAME = "DETAIL";
String ITEM_TEMPLATE_NAME = "ITEM";
String REGION_SUMMARY_TEMPLATE_NAME = "SUMMARY";
 
String templateName = DEFAULT_TEMPLATE_NAME;
 
HashMap context = new HashMap();
 
// Get cacheName for actions from request (might be null)
String cacheName = request.getParameter( CACHE_NAME_PARAM );
 
if ( cacheName != null )
{
cacheName = cacheName.trim();
}
 
// If an action was provided, handle it
String action = request.getParameter( ACTION_PARAM );
 
if ( action != null )
{
if ( action.equals( CLEAR_ALL_REGIONS_ACTION ) )
{
jcsBean.clearAllRegions();
}
else if ( action.equals( CLEAR_REGION_ACTION ) )
{
if ( cacheName == null )
{
// Not Allowed
}
else
{
jcsBean.clearRegion( cacheName );
}
}
else if ( action.equals( REMOVE_ACTION ) )
{
String[] keys = request.getParameterValues( KEY_PARAM );
 
for ( int i = 0; i < keys.length; i++ )
{
jcsBean.removeItem( cacheName, keys[ i ] );
}
 
templateName = REGION_DETAIL_TEMPLATE_NAME;
}
else if ( action.equals( DETAIL_ACTION ) )
{
templateName = REGION_DETAIL_TEMPLATE_NAME;
}
else if ( action.equals( ITEM_ACTION ) )
{
templateName = ITEM_TEMPLATE_NAME;
}
else if ( action.equals( REGION_SUMMARY_ACTION ) )
{
templateName = REGION_SUMMARY_TEMPLATE_NAME;
}
}
 
if ( request.getParameter( SILENT_PARAM ) != null )
{
// If silent parameter was passed, no output should be produced.
//return null;
}
else
{
// Populate the context based on the template
if ( templateName == REGION_DETAIL_TEMPLATE_NAME )
{
//context.put( "cacheName", cacheName );
context.put( "elementInfoRecords", jcsBean.buildElementInfo( cacheName ) );
}
else if ( templateName == DEFAULT_TEMPLATE_NAME )
{
context.put( "cacheInfoRecords", jcsBean.buildCacheInfo() );
}
}
 
///////////////////////////////////////////////////////////////////////////////////
//handle display
 
if ( templateName == ITEM_TEMPLATE_NAME )
{
String key = request.getParameter( KEY_PARAM );
 
if ( key != null )
{
key = key.trim();
}
 
JCS cache = JCS.getInstance( cacheName );
 
org.apache.jcs.engine.behavior.ICacheElement element = cache.getCacheElement( key );
%>
<h1> Item for key [<%=key%>] in region [<%=cacheName%>] </h1>
 
<a href="JCSAdmin.jsp?action=detail&cacheName=<%=cacheName%>">Region Detail</a>
| <a href="JCSAdmin.jsp">All Regions</a>
 
<pre>
<%=element%>
</pre>
<%
}
else
if ( templateName == REGION_SUMMARY_TEMPLATE_NAME )
{
%>
 
<h1> Summary for region [<%=cacheName%>] </h1>
 
<a href="JCSAdmin.jsp">All Regions</a>
 
<%
JCS cache = JCS.getInstance( cacheName );
String stats = cache.getStats();
%>
 
<br>
<b> Stats for region [<%=cacheName%>] </b>
 
<pre>
<%=stats%>
</pre>
 
<%
}
else
if ( templateName == REGION_DETAIL_TEMPLATE_NAME )
{
%>
 
<h1> Detail for region [<%=cacheName%>] </h1>
 
<a href="JCSAdmin.jsp">All Regions</a>
 
<table border="1" cellpadding="5" >
<tr>
<th> Key </th>
<th> Eternal? </th>
<th> Create time </th>
<th> Max Life (s) </th>
<th> Till Expiration (s) </th>
</tr>
<%
List list = (List)context.get( "elementInfoRecords" );
Iterator it = list.iterator();
while ( it.hasNext() ) {
CacheElementInfo element = (CacheElementInfo)it.next();
%>
<tr>
<td> <%=element.getKey()%> </td>
<td> <%=element.isEternal()%> </td>
<td> <%=element.getCreateTime()%> </td>
<td> <%=element.getMaxLifeSeconds()%> </td>
<td> <%=element.getExpiresInSeconds()%> </td>
<td>
<a href="JCSAdmin.jsp?action=item&cacheName=<%=cacheName%>&key=<%=element.getKey()%>"> View </a>
| <a href="JCSAdmin.jsp?action=remove&cacheName=<%=cacheName%>&key=<%=element.getKey()%>"> Remove </a>
</td>
</tr>
<%
}
 
JCS cache = JCS.getInstance( cacheName );
String stats = cache.getStats();
%>
</table>
 
<br>
<b> Stats for region [<%=cacheName%>] </b>
 
<pre>
<%=stats%>
</pre>
<%
}
else
{
%>
 
<h1> Cache Regions </h1>
 
<p>
These are the regions which are currently defined in the cache. 'Items' and
'Bytes' refer to the elements currently in memory (not spooled). You can clear
all items for a region by selecting 'Remove all' next to the desired region
below. You can also <a href="javascript:decision('Clicking OK will clear all the data from all regions!','JCSAdmin.jsp?action=clearAllRegions')">Clear all regions</a>
which empties the entire cache.
</p>
<p>
<form action="JCSAdmin.jsp">
<input type="hidden" name="action" value="item">
Retrieve (key) <input type="text" name="key"> &nbsp;
(region) <select name="cacheName">
<%
List listSelect = (List)context.get( "cacheInfoRecords" );
Iterator itSelect = listSelect.iterator();
while ( itSelect.hasNext() )
{
CacheRegionInfo record = (CacheRegionInfo)itSelect.next();
%>
<option value="<%=record.getCache().getCacheName()%>"><%=record.getCache().getCacheName()%></option>
<%
}
%>
</select>
<input type="submit">
</form>
</p>
 
<table border="1" cellpadding="5" >
<tr>
<th> Cache Name </th>
<th> Items </th>
<th> Bytes </th>
<th> Status </th>
<th> Memory Hits </th>
<th> Aux Hits </th>
<th> Not Found Misses </th>
<th> Expired Misses </th>
</tr>
 
<%
List list = (List)context.get( "cacheInfoRecords" );
Iterator it = list.iterator();
while (it.hasNext() )
{
CacheRegionInfo record = (CacheRegionInfo)it.next();
 
%>
<tr>
<td> <%=record.getCache().getCacheName()%> </td>
<td> <%=record.getCache().getSize()%> </td>
<td> <%=record.getByteCount()%> </td>
<td> <%=record.getStatus()%> </td>
<td> <%=record.getCache().getHitCountRam()%> </td>
<td> <%=record.getCache().getHitCountAux()%> </td>
<td> <%=record.getCache().getMissCountNotFound()%> </td>
<td> <%=record.getCache().getMissCountExpired()%> </td>
<td>
<a href="JCSAdmin.jsp?action=regionSummary&cacheName=<%=record.getCache().getCacheName()%>"> Summary </a>
| <a href="JCSAdmin.jsp?action=detail&cacheName=<%=record.getCache().getCacheName()%>"> Detail </a>
| <a href="javascript:decision('Clicking OK will remove all the data from the region [<%=record.getCache().getCacheName()%>]!','JCSAdmin.jsp?action=clearRegion&cacheName=<%=record.getCache().getCacheName()%>')"> Clear </a>
</td>
</tr>
<%
}
%>
</table>
<%
}
%>
 
 
</body>
 
</html>
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/xservices/tags/20130205r/web/WEB-INF/cxf-beans.xml
0,0 → 1,95
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:simple="http://cxf.apache.org/simple"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
 
<import resource="classpath:META-INF/cxf/cxf.xml" />
<!-- deprecated since CXF 2.4.0 -->
<!-- <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
/> -->
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
 
<jaxws:endpoint id="archiveservice"
implementor="net.brutex.xservices.ws.impl.ArchiveServiceImpl" address="/ArchiveService">
</jaxws:endpoint>
 
<jaxws:endpoint id="dateservice"
implementor="net.brutex.xservices.ws.impl.DateServiceImpl" address="/DateService">
</jaxws:endpoint>
 
<jaxws:endpoint id="fileservice"
implementor="net.brutex.xservices.ws.impl.FileServiceImpl" address="/FileService">
<jaxws:properties>
<entry key="mtom-enabled" value="false" />
</jaxws:properties>
</jaxws:endpoint>
 
<!-- This is the MTOM enabled FileServices endpoint -->
<jaxws:endpoint id="fileservice2"
implementor="net.brutex.xservices.ws.impl.FileServiceImpl" address="/FileServiceMTOM">
<jaxws:properties>
<entry key="mtom-enabled" value="true" />
<entry key="attachment-directory" value="c:\temp" />
<entry key="attachment-memory-threshold" value="2000" />
</jaxws:properties>
</jaxws:endpoint>
 
 
<jaxws:endpoint id="executeservice"
implementor="net.brutex.xservices.ws.impl.ExecuteServiceImpl" address="/ExecuteService">
</jaxws:endpoint>
 
<jaxws:endpoint id="jobservice"
implementor="net.brutex.xservices.ws.impl.JobServiceImpl" address="/JobService">
</jaxws:endpoint>
 
<jaxws:endpoint id="mailservice"
implementor="net.brutex.xservices.ws.impl.MailServiceImpl" address="/MailService">
</jaxws:endpoint>
 
<jaxws:endpoint id="miscservice"
implementor="net.brutex.xservices.ws.impl.MiscServiceImpl" address="/MiscService">
</jaxws:endpoint>
 
<jaxws:endpoint id="stringservice"
implementor="net.brutex.xservices.ws.impl.StringServiceImpl" address="/StringService">
</jaxws:endpoint>
 
<jaxws:endpoint id="storageservice"
implementor="net.brutex.xservices.ws.impl.StorageServiceImpl" address="/StorageService">
</jaxws:endpoint>
 
<jaxws:endpoint id="storageservice2"
implementor="net.brutex.xservices.ws.impl.StorageServiceImpl" address="/StorageServiceMTOM">
<jaxws:properties>
<entry key="mtom-enabled" value="true" />
<entry key="attachment-directory" value="c:\temp" />
<entry key="attachment-memory-threshold" value="2000" />
</jaxws:properties>
</jaxws:endpoint>
 
<jaxws:endpoint id="xmlservice"
implementor="net.brutex.xservices.ws.impl.XmlServiceImpl" address="/XmlService">
</jaxws:endpoint>
 
 
<jaxrs:server id="FileInfo" address="/fileinfo">
<jaxrs:serviceBeans>
<ref bean="FileInfoBean" />
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="FileInfoBean" class="net.brutex.xservices.ws.rs.FileInfoImpl" />
 
 
<jaxrs:server id="CVSInfo" address="/cvsinfo">
<jaxrs:serviceBeans>
<ref bean="CVSInfoBean" />
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="CVSInfoBean" class="net.brutex.xservices.ws.rs.CVSInfoImpl" />
 
</beans>
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/xservices/tags/20130205r/web/WEB-INF/web.xml
0,0 → 1,108
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/cxf-beans.xml</param-value>
</context-param>
<context-param>
<param-name>quartz:config-file</param-name>
<param-value>quartz.properties</param-value>
</context-param>
<context-param>
<param-name>quartz:shutdown-on-unload</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>quartz:wait-on-shutdown</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>quartz:start-scheduler-on-load</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>cache:thread-count</param-name>
<param-value>3</param-value>
</context-param>
 
<!--
<context-param>
<param-name>cvs-config-02</param-name>
<param-value>c:/temp/test2.txt</param-value>
</context-param>
<context-param>
<param-name>cvs-config-01</param-name>
<param-value>c:/temp/test.txt</param-value>
</context-param>
<context-param>
<param-name>cvs-config-03</param-name>
<param-value>c:/temp/test3.txt</param-value>
</context-param>
-->
<!-- Caching interval in minutes for CVS cache -->
<context-param>
<param-name>cvs-cache-interval</param-name>
<param-value>3</param-value>
</context-param>
<!-- CVS content search cache -->
<!--
<context-param>
<param-name>cvs-findings-configuration</param-name>
<param-value>c:/temp/cvs-findings.txt</param-value>
</context-param>
-->
 
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.quartz.ee.servlet.QuartzInitializerListener</listener-class>
</listener>
<listener>
<listener-class>net.brutex.xservices.util.cache.CacheExecutorService</listener-class>
</listener>
 
 
<servlet>
<servlet-name>XServices</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>QuartzInitializer</servlet-name>
<servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
<init-param>
<param-name>shutdown-on-unload</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>CacheServlet</servlet-name>
<servlet-class>net.brutex.xservices.util.cache.CacheServlet</servlet-class>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet>
<servlet-name>FindingsCacheServlet</servlet-name>
<servlet-class>net.brutex.xservices.util.cache.FindingsCacheServlet</servlet-class>
<load-on-startup>3</load-on-startup>
</servlet>
 
<servlet-mapping>
<servlet-name>XServices</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_SCHEDULER_STATE.ddl
0,0 → 1,8
create table qrtz_scheduler_state
(
sched_name varchar(120) not null,
instance_name varchar(200) not null,
last_checkin_time bigint not null,
checkin_interval bigint not null,
primary key (sched_name,instance_name)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_FIRED_TRIGGERS.ddl
0,0 → 1,15
create table qrtz_fired_triggers(
sched_name varchar(120) not null,
entry_id varchar(95) not null,
trigger_name varchar(200) not null,
trigger_group varchar(200) not null,
instance_name varchar(200) not null,
fired_time bigint not null,
priority integer not null,
state varchar(16) not null,
job_name varchar(200),
job_group varchar(200),
is_nonconcurrent varchar(5),
requests_recovery varchar(5),
primary key (sched_name,entry_id)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_JOB_DETAILS.ddl
0,0 → 1,13
create table qrtz_job_details (
sched_name varchar(120) not null,
job_name varchar(200) not null,
job_group varchar(200) not null,
description varchar(250) ,
job_class_name varchar(250) not null,
is_durable varchar(5) not null,
is_nonconcurrent varchar(5) not null,
is_update_data varchar(5) not null,
requests_recovery varchar(5) not null,
job_data blob,
primary key (sched_name,job_name,job_group)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_PAUSED_TRIGGER_GRPS.ddl
0,0 → 1,6
create table qrtz_paused_trigger_grps
(
sched_name varchar(120) not null,
trigger_group varchar(200) not null,
primary key (sched_name,trigger_group)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_SIMPLE_TRIGGERS.ddl
0,0 → 1,10
create table qrtz_simple_triggers(
sched_name varchar(120) not null,
trigger_name varchar(200) not null,
trigger_group varchar(200) not null,
repeat_count bigint not null,
repeat_interval bigint not null,
times_triggered bigint not null,
primary key (sched_name,trigger_name,trigger_group),
foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_SIMPROP_TRIGGERS.ddl
0,0 → 1,19
CREATE TABLE qrtz_simprop_triggers (
sched_name varchar(120) not null,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
STR_PROP_1 VARCHAR(512),
STR_PROP_2 VARCHAR(512),
STR_PROP_3 VARCHAR(512),
INT_PROP_1 INT,
INT_PROP_2 INT,
LONG_PROP_1 BIGINT,
LONG_PROP_2 BIGINT,
DEC_PROP_1 NUMERIC(13,4),
DEC_PROP_2 NUMERIC(13,4),
BOOL_PROP_1 varchar(5),
BOOL_PROP_2 varchar(5),
PRIMARY KEY (sched_name,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (sched_name,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(sched_name,TRIGGER_NAME,TRIGGER_GROUP)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_BLOB_TRIGGERS.ddl
0,0 → 1,8
create table qrtz_blob_triggers(
sched_name varchar(120) not null,
trigger_name varchar(200) not null,
trigger_group varchar(200) not null,
blob_data blob,
primary key (sched_name,trigger_name,trigger_group),
foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_TRIGGERS.ddl
0,0 → 1,20
create table qrtz_triggers(
sched_name varchar(120) not null,
trigger_name varchar(200) not null,
trigger_group varchar(200) not null,
job_name varchar(200) not null,
job_group varchar(200) not null,
description varchar(250),
next_fire_time bigint,
prev_fire_time bigint,
priority integer,
trigger_state varchar(16) not null,
trigger_type varchar(8) not null,
start_time bigint not null,
end_time bigint,
calendar_name varchar(200),
misfire_instr smallint,
job_data blob,
primary key (sched_name,trigger_name,trigger_group),
foreign key (sched_name,job_name,job_group) references qrtz_job_details(sched_name,job_name,job_group)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_CRON_TRIGGERS.ddl
0,0 → 1,9
create table qrtz_cron_triggers(
sched_name varchar(120) not null,
trigger_name varchar(200) not null,
trigger_group varchar(200) not null,
cron_expression varchar(120) not null,
time_zone_id varchar(80),
primary key (sched_name,trigger_name,trigger_group),
foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_LOCKS.ddl
0,0 → 1,6
create table qrtz_locks
(
sched_name varchar(120) not null,
lock_name varchar(40) not null,
primary key (sched_name,lock_name)
)
/xservices/tags/20130205r/web/WEB-INF/data/QRTZ_CALENDARS.ddl
0,0 → 1,6
create table qrtz_calendars(
sched_name varchar(120) not null,
calendar_name varchar(200) not null,
calendar blob not null,
primary key (sched_name,calendar_name)
)
/xservices/tags/20130205r/web/WEB-INF/.
Property changes:
Added: svn:ignore
+sun-jaxws.xml