Skip to content
Browse files

updated java driver jar; added additional mongo object construction n…

…otes
  • Loading branch information...
1 parent 0db0dd7 commit 749e500f097904c4017c9ee6f4ea0f8c000150ea @marcesher committed Sep 9, 2012
View
2 .classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="java/src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="lib/mongo-2.7.3.jar"/>
+ <classpathentry kind="lib" path="lib/mongo-2.9.0.jar"/>
<classpathentry kind="output" path="java/bin"/>
</classpath>
View
3 examples/aggregation/Application.cfc
@@ -0,0 +1,3 @@
+component{
+ this.name = "mongodb_aggregation_examples";
+}
View
3 examples/geospatial/Application.cfc
@@ -0,0 +1,3 @@
+component{
+ this.name = "mongodb_geo_examples";
+}
View
14 examples/gettingstarted.cfm
@@ -7,6 +7,19 @@ h2{
}
</style>
+<h1>Getting Started</h1>
+
+<p>The examples in this code are designed to show you how to use the CFMongoDB objects for saving and retrieving data to a running MongoDB datastore.
+However, this example creates a new mongo object, and closes it, every time it is run.
+</p>
+<p>
+In your applications, you <b>must</b> create the mongo object as an application-scoped singleton.
+See PeopleList/Application.cfc for an example. See the examples in <b>/examples/ioc</b> for constructing
+with ColdSpring or WireBox.
+</p>
+<p>If your applications create and close a mongo on every request, performance will suffer significantly.
+</p>
+
<!--- pass 'false' in the URL to use the mongo jars in your cfusion lib directory --->
<cfparam name="url.useJavaLoader" default="true">
@@ -53,6 +66,7 @@ h2{
COUNTER = 1
};
+ writeOutput("<h2>A saved document (struct)</h2>");
people.save( doc );
writeDump( var=doc, label="Saved document", expand="false" );
View
4 index.cfm
@@ -4,6 +4,7 @@
<style>
* {font-family: Tahoma,Arial,Helvetica,sans-serif;}
h1 {color: navy;}
+ .warning{ font-weight: bold; color: red;}
</style>
</head>
@@ -17,6 +18,9 @@
<br><br>
View other pages in the examples package for additional usage.
</p>
+ <p>
+ <span class="warning">Important!</span> See PeopleList/Application.cfc for properly constructing and closing an application-scoped instance of Mongo.
+ </p>
<p>
Off you go!
View
BIN lib/cfmongodb.jar
Binary file not shown.
View
BIN lib/mongo-2.7.3.jar
Binary file not shown.
View
BIN lib/mongo-2.9.0.jar
Binary file not shown.

0 comments on commit 749e500

Please sign in to comment.
Something went wrong with that request. Please try again.