You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by rg...@teamsol.com on 2002/01/04 19:27:30 UTC
Fulcrum
I am interested in looking at the Fulcrum services framework as a stand
alone system. I didn't see a seperate download area for this -- is there a
particular version of Turbine that I should be looking for the stand
alone?
Thanks,
Ray
multi-design app
Posted by Gunter Miessbrandt <mi...@ixtern.de>.
Hi!
First i try to explain what i want to develop:
The target of my project (called xaptor ;-)) is a framework on top of
turbine which
allows the user to simply develop an application with totally different
designs but
with the same process logic. So if someone request
http://www.server.de:8080/xaptor/servlet/xaptor/template/Index.vm dependent
of
the actual user setting in the database or somewhere else the screentemplate
in /templates/app/screens/selecteddesign/Index.vm with the screen
...de/ixtern/xaptor/modules/screens/selecteddesign/Index.java if available
or
...de/ixtern/xaptor/modules/screens/Index.java if no special screen for this
design is defined, will be responsed.
My first idea was to write my own TemplateService. The problem i have is the
access to
the actual request to get the current user.
Any other ideas, how i can solve this problem???
I have no problem to make this project open source if someone is interested
and if
the result is rather usable ;-). But i have just started!
Thanks
Gunter Miessbrandt
Excuse my bad english!
----------------------------------------------------------
ixtern Software + Systemhaus GmbH
Alter Postweg 101
D-86159 Augsburg
Fon +49 (0)8 21/25 92 84-0
Fax +49 (0)8 21/25 92 84-9
e-mail: miessbrandt@ixtern.de
www.ixtern.de www.netoffix.de
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Fulcrum
Posted by Hugh Brien <hp...@home.com>.
Ray,
I have included a test class and config file that worked on my server. It
should get you started.
r,
Hugh
----- Original Message -----
From: <rg...@teamsol.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Friday, January 04, 2002 1:27 PM
Subject: Fulcrum
> I am interested in looking at the Fulcrum services framework as a stand
> alone system. I didn't see a seperate download area for this -- is there a
> particular version of Turbine that I should be looking for the stand
> alone?
> Thanks,
> Ray
>
>
>
public class TestServicecs
{
public TestServicecs()
{
ServiceManager mgr = TurbineServices.getInstance();
ExtendedProperties props = new ExtendedProperties();
mgr.setApplicationRoot("H:/jakarta-turbine-fulcrum/root");
try
{
FileInputStream inputStream = new
FileInputStream(mgr.getApplicationRoot() +
"/conf/TurbineResources.properties");
props.load(inputStream);
file://props.display();
}
catch (Exception ex)
{
ex.printStackTrace();
}
mgr.setConfiguration(props);
try
{
mgr.init();
GlobalCacheService cs =
(GlobalCacheService)mgr.getService(GlobalCacheService.SERVICE_NAME);
CachedObject object1 = new CachedObject(new String("TEST1"));
CachedObject object2 = new CachedObject(new String("TEST2"));
cs.addObject("object1",object1);
cs.addObject("object2",object2);
try
{
String obj1 = (String)cs.getObject("object1").getContents();
String obj2 = (String)cs.getObject("object2").getContents();
System.out.println(obj1);
System.out.println(obj2);
}
catch (org.apache.fulcrum.cache.ObjectExpiredException ex)
{
ex.printStackTrace();
}
}
catch (org.apache.fulcrum.InitializationException ex)
{
ex.printStackTrace();
}
}
public static void main(String[] args)
{
TestServicecs testServicecs1 = new TestServicecs();
}
}
# -------------------------------------------------------------------
# $Id: TurbineResources.properties,v 1.71 2001/11/27 23:32:24 jmcnally Exp $
#
# This is the configuration file for Turbine.
#
# Note that strings containing "," (comma) characters must backslash
# escape the comma (i.e. '\,')
#
# -------------------------------------------------------------------
# -------------------------------------------------------------------
#
# L O G G I N G
#
# -------------------------------------------------------------------
# We use Log4J for all Turbine logging and we embed the log4j
# properties within our application configuration.
#
# NOTE:
# The presence of ${applicationRoot} in the logging configuration
# is not a mistake. Internally the value of ${applicationRoot}
# is set so that you can use it with standard log4j
# properties to get logs to appear in your
# webapp space.
# -------------------------------------------------------------------
# This first category is required and the category
# must be named 'default'. This is used for all logging
# where an explicit category is not specified (when using the Log
# utility class). It should be set to write to the same appender
# as the org.apache.turbine category.
log4j.category.default = DEBUG
# This category is used by Torque.
# This first category is required and the category
# must be named 'default'. This is used for all logging
# where an explicit category is not specified (when using the Log
# utility class). It should be set to write to the same appender
# as the org.apache.turbine category.
log4j.category.default = INFO, turbine
# This category is used by Turbine.
log4j.category.org.apache.turbine = INFO, turbine
log4j.appender.turbine = org.apache.log4j.FileAppender
log4j.appender.turbine.file =
H:/jakarta-turbine-fulcrum/root/logs/turbine.log
log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.turbine.append = false
# This category is used by Torque.
log4j.category.org.apache.torque = INFO, torque
log4j.appender.torque = org.apache.log4j.FileAppender
log4j.appender.torque.file = H:/jakarta-turbine-fulcrum/root/logs/torque.log
#log4j.appender.torque.file = ${applicationRoot}/logs/torque.log
log4j.appender.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.torque.append = false
# This category is used by Fulcrum the services framework.
log4j.category.org.apache.fulcrum = INFO, services
log4j.appender.services = org.apache.log4j.FileAppender
log4j.appender.services.file =
${H:/jakarta-turbine-fulcrum/root/logs/services.log
log4j.appender.services.layout = org.apache.log4j.PatternLayout
log4j.appender.services.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.services.append = true
# Setup the db service to use the same appender as torque. Set this
# category to DEBUG to see generated sql queries
log4j.category.org.apache.fulcrum.db = INFO, torque
# Setup the db service to use the same appender as torque
# -------------------------------------------------------------------
#
# J N D I C O N T E X T S
#
# -------------------------------------------------------------------
# This indicates whether Turbine should try to create JNDI contexts.
#
# Default: false
#
# contexts=true
# These are the JNDI context properties. Each context's properties
# are defined by the properties beginning with context.name.
#
# Default: none
#
# Example: The following will create a JNDI context named "name" in
# the data.contexts Hashtable. It will point at the RMI registry on
# localhost running on port 1099, and will use
# com.sun.jndi.rmi.registry.RegistryContextFactory as the initial
# context factory:
#
# context.name.java.naming.provider.url=rmi://localhost:1099
#
context.name.java.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryC
ontextFactory
# -------------------------------------------------------------------
#
# S E C U R E S O C K E T S L A Y E R
#
# -------------------------------------------------------------------
# Whether the web server is able to use SSL. Links in Turbine can
# check this property to determine if SSL can be used.
#
# Default: true
# -------------------------------------------------------------------
use.ssl=true
# -------------------------------------------------------------------
#
# S E R V I C E S
#
# -------------------------------------------------------------------
# Classes for Turbine Services should be defined here.
# Format: services.[name].classname=[implementing class]
#
# To specify properties of a service use the following syntax:
# service.[name].[property]=[value]
#
# The order that these services is listed is important! The
# order that is stated here is the order in which the services
# will be initialized. Keep this is mind if you have services
# that depend on other services during initialization.
# -------------------------------------------------------------------
services.FactoryService.classname=org.apache.fulcrum.factory.TurbineFactoryS
ervice
services.PoolService.classname=org.apache.fulcrum.pool.TurbinePoolService
services.MimeTypeService.classname=org.apache.fulcrum.mimetype.TurbineMimeTy
peService
services.SchedulerService.classname=org.apache.fulcrum.schedule.TurbineSched
ulerService
services.XmlRpcService.classname=org.apache.fulcrum.xmlrpc.TurbineXmlRpcServ
ice
services.UploadService.classname=org.apache.fulcrum.upload.TurbineUploadServ
ice
services.SecurityService.classname=org.tigris.scarab.services.ScarabDBSecuri
tyService
services.DatabaseService.classname=org.apache.fulcrum.db.TurbineDatabaseServ
ice
#services.XSLTService.classname=org.apache.fulcrum.xslt.TurbineXSLTService
#services.BSFService.classname=org.apache.fulcrum.bsf.TurbineBSFService
services.GlobalCacheService.classname=org.apache.fulcrum.cache.TurbineGlobal
CacheService
services.TemplateService.classname=org.apache.fulcrum.template.TurbineTempla
teService
services.RunDataService.classname=org.apache.turbine.services.rundata.Turbin
eRunDataService
services.LocalizationService.classname=org.apache.fulcrum.localization.Turbi
neLocalizationService
#services.PullService.classname=org.apache.turbine.services.pull.TurbinePull
Service
services.IntakeService.classname=org.apache.fulcrum.intake.TurbineIntakeServ
ice
# Turn on the appropriate template service.
services.VelocityService.classname=org.apache.fulcrum.velocity.TurbineVeloci
tyService
# -------------------------------------------------------------------
#
# D A T A B A S E S E R V I C E
#
# -------------------------------------------------------------------
# These are your database settings. Look in the
# org.apache.turbine.util.db.pool.* packages for more information.
# The default driver for Turbine is for MySQL.
#
# The parameters to connect to the default database. You MUST
# configure these properly.
# -------------------------------------------------------------------
services.DatabaseService.database.default=scarab
services.DatabaseService.database.scarab.driver=org.gjt.mm.mysql.Driver
services.DatabaseService.database.scarab.url=jdbc:mysql://kite:3306/scarab
services.DatabaseService.database.scarab.username=hbrien
services.DatabaseService.database.scarab.password=hbrien
# The number of database connections to cache per ConnectionPool
# instance (specified per database).
services.DatabaseService.database.scarab.maxConnections=30
# The amount of time (in milliseconds) that database connections will be
# cached (specified per database).
#
# Default: one hour = 60 * 60 * 1000
services.DatabaseService.database.scarab.expiryTime=3600000
# The amount of time (in milliseconds) a connection request will have to
wait
# before a time out occurs and an error is thrown.
#
# Default: ten seconds = 10 * 1000
services.DatabaseService.database.connectionWaitTimeout=10000
# The interval (in milliseconds) between which the PoolBrokerService logs
# the status of it's ConnectionPools.
#
# Default: No logging = 0 = 0 * 1000
services.DatabaseService.database.logInterval=0
# These are the supported JDBC drivers and their associated Turbine
# adaptor. These properties are used by the DBFactory. You can add
# all the drivers you want here.
services.DatabaseService.database.adaptor=DBMM
services.DatabaseService.database.adaptor.DBMM=org.gjt.mm.mysql.Driver
# Determines if the quantity column of the IDBroker's id_table should
# be increased automatically if requests for ids reaches a high
# volume.
services.DatabaseService.idbroker.clever.quantity=false
# Determines if IDBroker should prefetch IDs or not. If set to false
# this property has the effect of shutting off the housekeeping thread
# that attempts to prefetch the id's. It also sets the # of id's grabbed
# per request to 1 regardless of the settings in the database.
# Default: true
services.DatabaseService.idbroker.prefetch=true
services.DatabaseService.earlyInit = true
# -------------------------------------------------------------------
#
# R U N D A T A S E R V I C E
#
# -------------------------------------------------------------------
# Default implementations of base interfaces for request processing.
# Additional configurations can be defined by using other keys
# in the place of the <default> key.
# -------------------------------------------------------------------
services.RunDataService.default.run.data=org.apache.turbine.services.rundata
.DefaultTurbineRunData
services.RunDataService.default.parameter.parser=org.apache.turbine.Paramete
rParser
services.RunDataService.default.cookie.parser=org.apache.fulcrum.util.parser
.DefaultCookieParser
# -------------------------------------------------------------------
#
# C A C H E S E R V I C E
#
# -------------------------------------------------------------------
# Interval at which the cache will be checked. The default is
# 5000ms or 5 seconds.
services.GlobalCacheService.cacheCheckFrequency = 5000
# -------------------------------------------------------------------
#
# B S F S E R V I C E
#
# -------------------------------------------------------------------
services.BSFService.scriptsDirectory = WEB-INF/scripts
services.BSFService.defaultExtension = py
# -------------------------------------------------------------------
#
# T E M P L A T E S E R V I C E
#
# -------------------------------------------------------------------
# There is no configuration anymore, just an abstract front
# end to underlying template engines like velocity, webmacro,
# and JSP.
# -------------------------------------------------------------------
#
# V E L O C I T Y S E R V I C E
#
# -------------------------------------------------------------------
# The location of Velocity configuration file, relative to webapp root
# These properties will override the default properties set by Velocity.
# You should specify the path to the templates directories as well as
# the path to the log file and they should also be relative to webapp root
services.VelocityService.template.extension=vm
services.VelocityService.default.page.template = /Default.vm
services.VelocityService.default.layout.template = /Default.vm
services.VelocityService.runtime.log=/logs/velocity.log
#services.VelocityService.input.encoding=8859_1
#services.VelocityService.output.encoding=8859_1
services.VelocityService.velocimacro.library =
flux/GlobalMacros.vm,macros/GlobalMacros.vm,macros/ViewIssueMacro.vm,macros/
AdvancedQueryMacro.vm,macros/ReportMacro.vm, macros/SavedQueryMacro.vm
services.VelocityService.resource.loader = file
services.VelocityService.file.resource.loader.description = Velocity File
Resource Loader
services.VelocityService.file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
services.VelocityService.file.resource.loader.path =
file://H:\scarab-20011128\build/../src/templates,file://H:\scarab-20011128\b
uild/../src/templates/flux
services.VelocityService.file.resource.loader.cache = false
services.VelocityService.file.resource.loader.modificationCheckInterval = 2
services.VelocityService.resource.loader = classpath
services.VelocityService.classpath.resource.loader.description = Velocity
Classpath Resource Loader
services.VelocityService.classpath.resource.loader.class =
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
services.VelocityService.velocimacro.permissions.allow.inline.to.replace.glo
bal=true
services.VelocityService.velocimacro.library.autoreload=true
services.VelocityService.earlyInit = true
# -------------------------------------------------------------------
#
# U P L O A D S E R V I C E
#
# -------------------------------------------------------------------
# Whether the files should be automatically picked up by
# ParameterParser.
services.UploadService.automatic=true
#
# The directory where files will be temporarily stored.
#
services.UploadService.repository=.
#
# The maximum size of a request that will be processed.
#
services.UploadService.size.max=16777216
#
# The maximum size of a request that will have it's elements cached in
# memory by TurbineUploadService class.
#
services.UploadService.size.threshold=1048576
# -------------------------------------------------------------------
#
# L O C A L I Z A T I O N S E R V I C E
#
# -------------------------------------------------------------------
# Default ResourceBundle and language/country codes used by the
# TurbineLocalizationService.
#
services.LocalizationService.locale.default.bundle=ScarabBundle
#services.LocalizationService.locale.default.language=ko
#services.LocalizationService.locale.default.country=KR
services.LocalizationService.locale.default.language=en
services.LocalizationService.locale.default.country=US
#
# This will set the charset= portion of the ContentType: header.
# Leave commented out unless you want to return stuff as a different
# charset.
#
services.LocalizationService.locale.default.charset=8859_1
# -------------------------------------------------------------------
#
# M I M E T Y P E S E R V I C E
#
# -------------------------------------------------------------------
# This property specifies a file containing mappings between MIME
# content types and the corresponding file name extensions. The
# service itself contains a hardcoded set of most common mappings.
# The file must use the same syntax as the mime.types file of
# the Apache Server, i.e.
# <mimetype> <ext1> <ext2>...
#
#services.MimeTypeService.mime.types=/WEB-INF/conf/mime.types
# This property specifies a file containing mappings between locales
# and the corresponding character encodings. The service itself
# contains a hardcoded set of most common mappings.
# The file should use the Java property file syntax, i.e.
# <lang_country_variant>=<charset>
#
#services.MimeTypeService.charsets=/WEB-INF/conf/charset.properties
# -------------------------------------------------------------------
#
# S C H E D U L E R S E R V I C E
#
# -------------------------------------------------------------------
#
# Set enabled to true to start the scheduler.
#
# Default = false
#
services.SchedulerService.earlyInit = false
# -------------------------------------------------------------------
#
# S E C U R I T Y S E R V I C E
#
# -------------------------------------------------------------------
#
# This is the class that implements the User interface.
# You want to override this setting only if you want your User
# implementation to provide application specific addtional
# functionality.
#
# Default: org.apache.fulcrum.security.impl.db.entity.TurbineUser
#
#
# This setting is DBSecurityService specific - this class is consulted for
the names
# of the columns in the users' tables for the purpose of creating join
queries.
# If you use your own User implementation in conjunction with
DBSecurityService,
# it's peer class must implement
org.apache.turbine.om.security.peer.UserPeer interface,
# and you need to specify the name of the peer class here.
#
# Defalut: org.apache.turbine.om.security.peer.TurbineUserPeer
#
#
# This is the class that implements UserManager interface.
# Override this setting if you want your User information stored
# on a different medium (LADP directory is a good example).
# Default implementation uses Peers and a relational database .
#
services.SecurityService.user.manager=org.apache.fulcrum.security.impl.db.DB
UserManager
#
# This is used by the SecurityService to make the password checking
# secure. When enabled, passwords are transformed by a one-way
# function into a sequence of bytes that is base64 encoded.
# It is impossible to guess the plain-text form of the password
# from the representation. When user logs in, the entered password
# is transformed the same way and then compared with stored value.
#
# Default: false
#
services.SecurityService.secure.passwords=true
#
# This property lets you choose what digest algorithm will be used
# for encrypting passwords. Check documentation of your JRE for
# available algorithms.
#
# Default: SHA
#
services.SecurityService.secure.passwords.algorithm=SHA
# -------------------------------------------------------------------
#
# X M L R P C S E R V I C E
#
# -------------------------------------------------------------------
# This property specifies which class should be used to parse
# xml for XmlRpc functionality.
#
# Default: org.apache.xerces.parsers.SAXParser
services.XmlRpcService.parser=org.apache.xerces.parsers.SAXParser
# This property specifies which port the server part of the XmlRpc
# should listen, if it is active.
#
# Default: 12345
services.XmlRpcService.port=12345
# If any classes are specified here, the Service will create an
# instance of them here and start up a listener on the specified
# port.
#
# Note that the handlers demonstrated are not very useful. You
# will have to invent your own services. They do however
# illustrate that any class with a default constructor can be
# added here
#
# The handler parameter without further extension determines
# the default handler for the service
#
# Default: no classes are specified by default
#services.XmlRpcService.handler.$default=java.util.Hashtable
#services.XmlRpcService.handler.stringhandler=java.lang.String
# The following properties allow the transfer of data between
# separate Turbine applications running on different servers.
# This allows B2B type behavior such as sending database
# updates in the form of XML or whatever type of data
# that needs to be shared between Turbine applications
# running on separate servers.
#services.XmlRpcService.handler.file =
org.apache.fulcrum.xmlrpc.util.FileHandler
services.XmlRpcService.paranoid = false
services.XmlRpcService.acceptClient = 192.168.1.*
services.XmlRpcService.denyClient =
# Do we want a secure server
services.XmlRpcService.secure.server = false
# Secure server options
services.XmlRpcService.secure.server.option.java.protocol.handler.pkgs = \
com.sun.net.ssl.internal.www.protocol
services.XmlRpcService.secure.server.option.security.provider = \
com.sun.net.ssl.internal.ssl.Provider
services.XmlRpcService.secure.server.option.security.protocol = TLS
# You probably want to keep your key stores and trust stores
# clear out of your webapp.
services.XmlRpcService.secure.server.option.javax.net.ssl.keyStore =
/tmp/keystore
services.XmlRpcService.secure.server.option.javax.net.ssl.keyStoreType = jks
services.XmlRpcService.secure.server.option.javax.net.ssl.keyStorePassword =
password
services.XmlRpcService.secure.server.option.javax.net.ssl.trustStore =
/tmp/truststore
services.XmlRpcService.secure.server.option.javax.net.ssl.trustStoreType =
jks
services.XmlRpcService.secure.server.option.javax.net.ssl.trustStorePassword
= password
services.XmlRpcService.secure.server.option.sun.ssl.keymanager.type =
SunX509
services.XmlRpcService.secure.server.option.sun.ssl.trust.manager.type =
SunX509
# These values should be set to 'all' for debugging purposes.
services.XmlRpcService.secure.server.option.javax.net.debug = none
services.XmlRpcService.secure.server.option.java.security.debug = none
services.XmlRpcService.earlyInit = true
# -------------------------------------------------------------------
#
# P O O L S E R V I C E
#
# -------------------------------------------------------------------
# Default capacity of pools of the Object pooling service.
#
# Default: 128
services.PoolService.pool.capacity = 128
# Class specific capacities used instead of the default if specified.
#
#services.PoolService.pool.capacity.org.apache.turbine.services.rundata.Defa
ultTurbineRunData=512
# -------------------------------------------------------------------
#
# F A C T O R Y S E R V I C E
#
# -------------------------------------------------------------------
# A comma separated list of classloaders (very optional)
#
# Example: org.foo.bar.MyClassLoader, org.ack.joe.YourClassLoader
#
#services.FactoryService.class.loaders=
# Customized factories to be used instead of the default factory.
# E.g. to instantiate XML parsers, SSL sockets, etc., which require
# specific instantiation not supported by the default factory.
# The property name is prefixed with "factory" followed by the
# name of the production class. The value is the class name of
# the factory implementing the Factory interface. The factory
# will be instantiated by using the service itself.
#
# Examples:
#
#
services.FactoryService.factory.javax.xml.parsers.DocumentBuilder=org.foo.xm
l.DomBuilderFactory
#
services.FactoryService.factory.javax.xml.parsers.SAXParser=org.foo.xml.SaxP
arserFactory
#
services.FactoryService.factory.java.net.ServerSocket=org.foo.net.SslServerS
ocketFactory
# -------------------------------------------------------------------
#
# I N T A K E S E R V I C E
#
# -------------------------------------------------------------------
# The location of the xml file specifying valid inputs
#
# Example: org.foo.bar.MyClassLoader, org.ack.joe.YourClassLoader
#
services.IntakeService.xml.path=WEB-INF/conf/intake.xml
#--------------------------------------------------------------------
#
# P A R A M E T E R P A R S E R
#
#--------------------------------------------------------------------
#
# This variable controls the case folding applied to URL variable
# names.
#
# Allowed values: none, lower, upper
# Default: lower
#
url.case.folding=lower
# -------------------------------------------------------------------
#
# A D D I T I O N A L P R O P E R T I E S
#
# -------------------------------------------------------------------
# The full path name to an additional properties file. Properties in
# this file will be included in this property set. Duplicate name
# values will be replaced, so be careful.
#
# Default: none
# -------------------------------------------------------------------
include=./Scarab.properties
include=./Flux.properties
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Fulcrum
Posted by Jason van Zyl <jv...@zenplex.com>.
On 1/4/02 1:27 PM, "rgrieselhuber@teamsol.com" <rg...@teamsol.com>
wrote:
> I am interested in looking at the Fulcrum services framework as a stand
> alone system. I didn't see a seperate download area for this -- is there a
> particular version of Turbine that I should be looking for the stand
> alone?
Fulcrum doesn't depend on Turbine, but there are still some naming
conventions that might make it look like it does. Fulcrum isn't released so
there isn't actually an official release.
> Thanks,
> Ray
>
>
>
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>