Re: oracle config
Michael Nash <[email protected]> Mon, 24 Oct 2005 13:42:02 -0400
| Newsgroups | gmane.comp.java.keel.devel |
|---|---|
| Organization | JGlobal Limited |
| Message-ID | <1130175721.16865.386.camel@139-142-200-104> |
Raj: On Mon, 2005-10-24 at 12:27, Raj Joshi wrote: > questions: > 1. Is there a Keel recommended way to execute stored procedures via JDBC from a model? I tried: > DataSourceComponent ds = (DataSourceComponent) request.getComponent(DataSourceComponent.ROLE, request.getDomain()); > You can use "getService" from ModelRequest to access other services. > but looks like getComponent doesn't exist in ModelRequest. > > 2. What is the Keel recommended way to save information in a Model for reuse within a session by same user. In other words, trying to figure if possible to have: > @x-avalon.lifestyle type=session > instead of > @x-avalon.lifestyle type=singleton You can use "context" to save information for a user - e.g. use DefaultContext c = request.getContext(); c.put(key, data) and retrieve it again (for the same user) You can also get the session id, if you prefer, and use that to store data in a persistent store (e.g. database, file, etc) for a specific user. HTH! Mike > > TIA > -Raj > -----Original Message----- > From: Shash Chatterjee <[email protected]> > Date: Wed, 12 Oct 2005 22:10:35 -0500 > To: developers-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected] <developers-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected]> > Subject: Re: [Keelgroup] oracle config > > Wha'dya know!!!! I type the error in Google, and out pops three hits, > all related to Keel! > > This one has the answer: > http://www.mail-archive.com/keelgroup-keelframework.com-rI8AND0JKYOgdSakss0wQjGcDxdMUgRv@public.gmane.org/msg02006.html > > > > Thanks Shash, > > I changed log level from "WARN" to "DEBUG" for svc-persist-default. > > It was already at "DEBUG" in svc-persist-base. But that didn't help > > solve the mystery. Actually when I attempt: > > http://localhost:8080/default/model.do?model=createdb&db="wrapps" > > <http://localhost:8080/default/model.do?model=createdb&db=%22raj-db%22> > > the only log entry that changes is client.log. > > BTW, I am using the code you sent me as-is. I've not changed the id > > attribute other than the jdbc-url, user, and password for my db. And > > that's why using "wrapps." > > > > > > It is still the same error: > > Could not return a reference to the Component > > (Key='org.keel.services.persist.PersistentFactory/wrapps') > > org.keel.services.model.ModelException: Could not return a reference > > to the Component > > (Key='org.keel.services.persist.PersistentFactory/wrapps') > > ... > > at org.keel.servers.direct > > .KeelDirectServer$MultiThreadedProcessor.run(KeelDirectServer.java:271) > > Caused by: java.lang.IllegalArgumentException: Unknown java.sql.Types > > type -104 > > at > > org.keel.services.persist.base.JDBCDatabaseType.typeToString(JDBCDatabaseType.java:1091) > > at > > org.keel.services.persist.base.OracleDatabaseType.setDataSource(OracleDatabaseType.java:93) > > ... > > > > Thanks. > > > > http://keelframework.org/documentation.shtml > Keelgroup mailing list > [email protected] > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com http://keelframework.org/documentation.shtml Keelgroup mailing list [email protected] http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com