Re: oracle config
Raj Joshi <[email protected]> Tue, 25 Oct 2005 18:56:55 -0400
| Newsgroups | gmane.comp.java.keel.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============1960630237== Content-Type: multipart/alternative; boundary="----=_Part_13194_22287660.1130281015875" ------=_Part_13194_22287660.1130281015875 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Mike, that was very helpful. -Raj On 10/24/05, Michael Nash <[email protected]> wrote: > > 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 JDB= C > from a model? I tried: > > DataSourceComponent ds =3D (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=3Dsession > > instead of > > @x-avalon.lifestyle type=3Dsingleton > > You can use "context" to save information for a user - e.g. use > > DefaultContext c =3D 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-rI8AND0JKYOgdSakss0wQmGXanvQGlWp@public.gmane.org= rk.com/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=3Dcreatedb&db=3D"wrapps" > > > <http://localhost:8080/default/model.do?model=3Dcreatedb&db=3D%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=3D'org.keel.services.persist.PersistentFactory/wrapps') > > > org.keel.services.model.ModelException: Could not return a reference > > > to the Component > > > (Key=3D'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 > ------=_Part_13194_22287660.1130281015875 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Mike, that was very helpful.<br> -Raj<br><br><div><span class=3D"gmail_quote">On 10/24/05, <b class=3D"gmail= _sendername">Michael Nash</b> <<a href=3D"mailto:[email protected]">mnas= [email protected]</a>> wrote:</span><blockquote class=3D"gmail_quote" style= =3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; p= adding-left: 1ex;"> Raj:<br><br>On Mon, 2005-10-24 at 12:27, Raj Joshi wrote:<br>> questions= :<br>> 1. Is there a Keel recommended way to execute stored procedures v= ia JDBC from a model? I tried:<br>> &n= bsp; DataSourceComponent ds =3D (DataSourceComponent) request.getComponent(DataSourceComponent.ROLE, request.getDomain());<br>>= ;<br><br>You can use "getService" from ModelRequest to access oth= er services.<br><br>> but looks like getComponent doesn't exist in Model= Request. <br>><br>> 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:<br>> @x-avalon.lifestyle type=3Dsession<b= r>> instead of<br>> @x-avalon.lifestyle type=3Dsingleton<br><br>You c= an use "context" to save information for a user - e.g. use<br><br= > DefaultContext c =3D request.getContext();<br>c.put(key, data)<br><br>and r= etrieve it again (for the same user)<br><br>You can also get the session id= , if you prefer, and use that to store<br>data in a persistent store (e.g . database, file, etc) for a specific<br>user.<br><br>HTH!<br><br>Mike<br><= br>><br>> TIA<br>> -Raj<br>> -----Original Message-----<br>>= From: Shash Chatterjee <<a href=3D"mailto:[email protected]">shash@badfw.= org </a>><br>> Date: Wed, 12 Oct 2005 22:10:35 -0500<br>> To: <a href= =3D"mailto:developers-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected]">developers-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected]</a> &= lt;<a href=3D"mailto:developers-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected]">developers@keelframework= .org </a>><br>> Subject: Re: [Keelgroup] oracle config<br>><br>> Wha= 'dya know!!!! I type the error in Google, and out pops three hit= s,<br>> all related to Keel!<br>><br>> This one has the answer:<br= >>=20 <a href=3D"http://www.mail-archive.com/[email protected]= elframework.com/msg02006.html">http://www.mail-archive.com/keelgroup-keelfr= [email protected]/msg02006.html</a><br>><br>><br> > > Thanks Shash,<br>> > I changed log level from "WARN&qu= ot; to "DEBUG" for svc-persist-default.<br>> > It was alrea= dy at "DEBUG" in svc-persist-base. But that didn't hel= p<br>> > solve the mystery. Actually when I attempt: <br>> > <a href=3D"http://localhost:8080/default/model.do?model=3Dcre= atedb&db=3D"wrapps"">http://localhost:8080/default/model.do?m= odel=3Dcreatedb&db=3D"wrapps"</a><br>> > <<a href=3D= "http://localhost:8080/default/model.do?model=3Dcreatedb&db=3D%22raj-db= %22"> http://localhost:8080/default/model.do?model=3Dcreatedb&db=3D%22raj-db%= 22</a>><br>> > the only log entry that changes is client.log.<br>&= gt; > BTW, I am using the code you sent me as-is. I've not ch= anged the id <br>> > attribute other than the jdbc-url, user, and password for my = db. And<br>> > that's why using "wrapps."<br>> ><br>&= gt; ><br>> > It is still the same error:<br>> > Could not re= turn a reference to the Component <br>> > (Key=3D'org.keel.services.persist.PersistentFactory/wrapps')<= br>> > org.keel.services.model.ModelException: Could not return a ref= erence<br>> > to the Component<br>> > (Key=3D'org.keel.services= .persist.PersistentFactory /wrapps')<br>> > ...<br>> > at org.keel= .servers.direct<br>> > .KeelDirectServer$MultiThreadedProcessor.run(K= eelDirectServer.java:271)<br>> > Caused by: java.lang.IllegalArgument= Exception: Unknown=20 java.sql.Types<br>> > type -104<br>> > = at<br>> > org.keel.services.persist.base.JDBCDatabaseType.typeToStrin= g(JDBCDatabaseType.java:1091)<br>> > at<br>&g= t; > org.keel.services.persist.base.OracleDatabaseType.setDataSource (OracleDatabaseType.java:93)<br>> > ...<br>> ><br>> > Tha= nks.<br>><br>><br>><br>> <a href=3D"http://keelframework.org/do= cumentation.shtml">http://keelframework.org/documentation.shtml</a><br>>= Keelgroup mailing list <br>> <a href=3D"mailto:[email protected]">Keelgroup@lis= ts.keelframework.com</a><br>> <a href=3D"http://lists.keelframework.com/= listinfo.cgi/keelgroup-keelframework.com">http://lists.keelframework.com/li= stinfo.cgi/keelgroup-keelframework.com </a><br><br><a href=3D"http://keelframework.org/documentation.shtml">http:/= /keelframework.org/documentation.shtml</a><br>Keelgroup mailing list<br><a = href=3D"mailto:[email protected]">[email protected]= work.com </a><br><a href=3D"http://lists.keelframework.com/listinfo.cgi/keelgroup-ke= elframework.com">http://lists.keelframework.com/listinfo.cgi/keelgroup-keel= framework.com</a><br></blockquote></div><br> ------=_Part_13194_22287660.1130281015875-- --===============1960630237== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline http://keelframework.org/documentation.shtml keelgroup mailing list [email protected] http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com --===============1960630237==--