So calling GeoTools.init( initialConext ); seemed to help. Honestly I am not
sure how I got it working.
Don't hate me, but I am writing my application in clojure. The code is
here<https://github.com/modilabs/analyticalengine/blob/master/src/main/clojure/analyticalengine/servlet.clj>.
I really need to get something working quickly, but I would love to
contribute an example in Java when I have more down time.
Also Jody, your work (along with others) on documentation has made getting
started with GeoTools so much easier.
Thanks again Jody.
Ivan Willig
On Wed, Jul 13, 2011 at 6:35 PM, Jody Garnett <[email protected]>
wrote:
>
> Was there some special trick? Being able to show an example such as Jetty
would probably help the next person. I don't work in a formal Java EE env
much so it is not really docs I can write on my own.
>
> --
> Jody Garnett
>
> On Thursday, 14 July 2011 at 6:14 AM, Ivan Willig wrote:
>
> Thanks Jody,
> I got everything working.
> Ivan Willig
>
>
>
> On Wed, Jul 13, 2011 at 10:15 AM, Ivan Willig <[email protected]> wrote:
>
> Yeah good point Jody;).
> So I think I am a lot closer, but I still don't think that have my
jetty-env.xml configured correctly.
>
https://github.com/modilabs/analyticalengine/blob/master/src/main/webapp/WEB-INF/jetty-env.xml
> Could someone double check or give me an example of what my xml should
look like?
>
> Ivan Willig
>
>
>
> On Wed, Jul 13, 2011 at 9:46 AM, Jody Garnett <[email protected]>
wrote:
>
> Don't thank me yet :-) Tell me if it works and reply with a code example
for the docs (or correction for the one that is there).
> Darn the docs are very hidden; integration is considered an advanced topic
...
>
http://docs.geotools.org/latest/userguide/library/internal/integration.html
> http://docs.geotools.org/latest/userguide/library/internal/jndi.html
> Etc...
> --
> Jody Garnett
>
> On Wednesday, 13 July 2011 at 11:30 PM, Ivan Willig wrote:
>
> Thanks Jody,
> Ivan Willig
>
>
>
> On Wed, Jul 13, 2011 at 8:59 AM, Jody Garnett <[email protected]>
wrote:
>
> You can either:
> a) Lookup the DataSource yourself (using its JNDI name) and pass it into a
DataStore using the datasource connection parameter
> -or-
> b) Use a Factory that expects a JNDI reference and configure the
connection parameters with the JNDI name; for this to work you need to teach
GeoTools about hte "initial context" it is running in.
> See the GeoTools class for details (it is where all integration stuff
happens; JNDI, Logging, etc...)
> --
> Jody Garnett
>
> On Wednesday, 13 July 2011 at 10:03 PM, Ivan Willig wrote:
>
> Hi,
> Just to give a warning to everyone I am new to GeoTools and Java
development. Feel free to mention if I am doing everything completely wrong
:).
> I am struggling with getting started with using GeoTools with an
jetty-env.xml to store my datastore configuration. I would like to open my
connection to a gt-datastore when i created my servelet object. I have
search via google, the GeoTools sphinx documentation and GeoServer's
documentation but i am still at a loss.
> I think basically i don't see the path from going from a JNDI resource, as
configured in my jetty-env.xml, to a javax.sql.DataSource and to finally a
GeoTools datastore object.
> Please let me know if my question does not make any sense.
> Thanks.
>
> Ivan Willig
>
>
------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric
> Ries, the creator of the Lean Startup Methodology on "Lean Startup
> Secrets Revealed." This video shows you how to validate your ideas,
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
>
>
>
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users