Setting single Ebase up for 2 different councils

Post any questions regarding Installing or Upgrading Ebase, including problems starting up the Ebase Xi Server or Designer

Moderators: Jon, Steve, Ian, Dave

JoshuaW
Ebase User
Posts: 19
Joined: Fri Oct 24, 2008 1:55 pm
Location: WFH, Oxfordshire, UK
Contact:

Setting single Ebase up for 2 different councils

#1

Postby JoshuaW » Mon Jun 08, 2009 10:37 am

Hi all

What's the best method of installing, setting up Ebase for 2 councils. Forms are to be the same, but templating and data sources are different.

Anyone who'd had experience with that? Any suggestions welcome.

Kind regards
Josh
0 x

User avatar
Joost
Ebase User
Posts: 49
Joined: Fri Sep 14, 2007 6:14 pm
Location: The Netherlands

Re: Setting single Ebase up for 2 different councils

#2

Postby Joost » Tue Jun 09, 2009 5:57 am

JoshuaW wrote:setting up Ebase for 2 councils. Forms are to be the same, but templating and data sources are different.
By naming the template and datasource the same you may use the deployment manager to put the form on two Ebase enironments at once.
http://portal.ebasetech.com/cp/doc/Depl ... anager.htm

If only different tables are used in the same database you may consider using parameters in the database resource to distinguish which table you want. Eg. TABLENAME_&&PARAMETER

In both cases you may use a single Tomcat with two Ebase environments. Or two Tomcat's each with one Ebase environment. The first is a little easier to setup but will share at least Tomcat thus if it goes down for maintenance all environments are down.
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#3

Postby Wai » Wed Jun 10, 2009 3:40 pm

If you have one Ebase instance with one web application and one Ebase repository:

It's possible to change the template at runtime based on the Council the forms are running for, so you can design different templates for each council.

Councils will share the repository but you will have to have its own datasources defined for application data.
0 x

Hovik
Moderator
Moderator
Posts: 184
Joined: Tue Sep 11, 2007 8:58 am

#4

Postby Hovik » Mon Jun 22, 2009 2:51 pm

Also consider dynamic databases, suitable only when same database resources / dynamic lists/ stored procedures are required to run, but the physical database is different - normally determined by some logic.

Just as you can dynamically set the template - using fpl:

Code: Select all

set template my_template;
you can also set the database to be used - using fpl:

Code: Select all

set $DATABASE = 'A_DATABASE_ELEMENT_DEFINED_IN_DESIGNER';
Example fpl, probably in a before form event:

Code: Select all

if [CUST_ID = 1]
   set template CUST_TEMPLATE_1;
   set $DATABASE = 'CUST_DB_1';
endif
if [CUST_ID = 2]
   set template CUST_TEMPLATE_2;
   set $DATABASE = 'CUST_DB_2';
endif
or, even better:

Code: Select all

set cust_command = 'set template CUST_TEMPLATE_' + tostring(CUST_ID);
interpret cust_command;
set cust_command = 'set $DATABASE = ' + QUOT + 'CUST_DB_'+ tostring(CUST_ID) + QUOT;   // QUOT is a form field containing a single quote character as its default value
interpret cust_command;
Full details available in the online documentation (search for $DATABASE)
0 x


Who is online

Users browsing this forum: No registered users and 59 guests