Skip to content

Commit b9f1fac

Browse files
author
David Holt
committed
Changed the default persistent store to use H2. Updated the README, classpaths and property files to reflect this. Also removed the default connection dictionary from the model because we are relying on properties to set the connection dictionary.
Signed-off-by: David Holt <[email protected]>
1 parent 3b2f0bd commit b9f1fac

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
lines changed

README

+20-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
This is a simple blog app that was created in the spirit of the 'WO in
2-
15 minutes' movie created by Jonathan ‘Wolf’ Rentzsch.
1+
This is a simple blog app that is being created in the spirit of
2+
updating the blog application created in the 'WO in 15 minutes' movie
3+
made by Jonathan ‘Wolf’ Rentzsch.
34

4-
This example application has been designed to showcase ERModernLook
5-
development as well as demonstrate some lesser known page level and
6-
property level components available to the D2W developer in ERModernLook
7-
and the broader ERD2W framework. I hope it will eventually show the
8-
progression of building up and customizing a D2W application. Emphasis will
9-
be on building up the administrative interface.
5+
SimpleBlog has been designed to showcase ERModernLook development as
6+
well as demonstrate some lesser known page level and property level
7+
components available to the D2W developer in ERModernLook and the
8+
broader ERD2W framework. I hope it will eventually show the progression
9+
of building up and customizing a D2W application. Emphasis will be on
10+
building up the administrative interface.
1011

11-
ERRest integration is now being added to show how it might be used
12-
to create a front-end with several desirable features such as nice URLs.
12+
ERRest integration is being added to show how it might be used to create
13+
a front-end with several desirable features such as nice URLs.
1314

14-
It depends on ERModernDirectToWeb modifications that are currently
15+
SimpleBlog depends on ERModernDirectToWeb modifications that are currently
1516
located in my Wonder fork but may end up in Wonder proper.
1617

17-
The application also depends on a FrontBase database. This may change in the
18-
future and/or you may want to change your properties file to point to a
19-
database from a different vendor.
18+
SimpleBlog depends on a H2 database. The file H2 uses is located in
19+
/tmp which will be deleted on restart. You may want to change the
20+
property to point to a more permanent location if you want the database
21+
to persist.
2022

21-
The database you create should be named 'simpleblog' and will start up
22-
with a user with login credentials:
23+
You may want to change your properties file to point to a database from
24+
a different vendor.
25+
26+
The database will start up with a user with login credentials:
2327

2428
username: test password: test
2529

SimpleBlog/.classpath

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
<classpathentry kind="con" path="WOFramework/WOLips"/>
2525
<classpathentry kind="con" path="WOFramework/SimpleBlogLogic"/>
2626
<classpathentry kind="con" path="WOFramework/ERRest"/>
27+
<classpathentry kind="con" path="WOFramework/H2PlugIn"/>
2728
<classpathentry kind="output" path="bin"/>
2829
</classpath>

SimpleBlog/Resources/Properties

+14-6
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,26 @@ er.extensions.ERXEnterpriseObject.updateInverseRelationships=true
1515
# you have these settings in your WebObjects.properties or your Application properties
1616
# Note that you *should* include the ones that are empty to stomp over any settings
1717
# in the ERCoreBusinessLogic.eomodeld
18-
#dbConnectURLGLOBAL = <my jdbc url>
19-
#dbConnectUserGLOBAL = <my database user>
18+
dbConnectURLGLOBAL =
19+
dbConnectUserGLOBAL =
2020
dbConnectDriverGLOBAL =
2121
#dbConnectPasswordGLOBAL = <my database password>
2222
dbConnectPluginGLOBAL =
2323
dbConnectJDBCInfoGLOBAL =
2424

2525
# FrontBase Connection Dictionary
26-
dbConnectUserGLOBAL=_system
27-
dbConnectPasswordGLOBAL=
28-
dbConnectURLGLOBAL=jdbc:FrontBase://localhost/simpleblog
29-
er.extensions.ERXSQLHelper$FrontBaseSQLHelper
26+
# To use a different database than FrontBase, add the appropriate plugin to the build path
27+
# and change the default connection dictionary to use the correct prototypes
28+
# and remove the H2 plugin from the build path and comment out the H2 related
29+
# properties below
30+
# dbConnectUserGLOBAL=_system
31+
# dbConnectPasswordGLOBAL=
32+
# dbConnectURLGLOBAL=jdbc:FrontBase://localhost/simpleblog
33+
# er.extensions.ERXSQLHelper$FrontBaseSQLHelper
34+
35+
# H2 Connection Dictionary
36+
dbConnectURLGLOBAL = jdbc:h2:file:/tmp/ERBlog
37+
dbConnectPluginGLOBAL = H2PlugIn
3038

3139
# Migrations
3240
er.migration.migrateAtStartup=true

SimpleBlogLogic/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
<classpathentry kind="con" path="WOFramework/JavaWebObjects"/>
1414
<classpathentry kind="con" path="WOFramework/JavaXML"/>
1515
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
16-
<classpathentry kind="con" path="WOFramework/FrontBasePlugIn"/>
16+
<classpathentry kind="con" path="WOFramework/H2PlugIn"/>
1717
<classpathentry kind="output" path="bin"/>
1818
</classpath>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
EOModelVersion = "2.1";
33
adaptorName = JDBC;
4-
connectionDictionary = {URL = "jdbc:FrontBase://127.0.0.1/DatabaseName"; };
54
entities = (
65
{className = "com.wowodc.model.BlogCategory"; name = BlogCategory; },
76
{className = EOGenericRecord; name = BlogCategoryEntry; },
@@ -10,16 +9,4 @@
109
{className = "com.wowodc.model.Role"; name = Role; },
1110
{className = EOGenericRecord; name = XPersonRole; }
1211
);
13-
userInfo = {
14-
"_EntityModeler" = {
15-
activeDatabaseConfigName = Default;
16-
databaseConfigs = {
17-
Default = {
18-
adaptorName = JDBC;
19-
connectionDictionary = {URL = "jdbc:FrontBase://127.0.0.1/DatabaseName"; };
20-
prototypeEntityName = EOJDBCFrontBasePrototypes;
21-
};
22-
};
23-
};
24-
};
2512
}

0 commit comments

Comments
 (0)