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> &lt;<a href=3D"mailto:[email protected]">mnas=
[email protected]</a>&gt; 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>&gt; questions=
:<br>&gt; 1. Is there a Keel recommended way to execute stored procedures v=
ia JDBC from a model?&nbsp;&nbsp;I tried:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DataSourceComponent ds =3D (DataSourceComponent)
request.getComponent(DataSourceComponent.ROLE, request.getDomain());<br>&gt=
;<br><br>You can use &quot;getService&quot; from ModelRequest to access oth=
er services.<br><br>&gt; but looks like getComponent doesn't exist in Model=
Request.
<br>&gt;<br>&gt;
2. What is the Keel recommended way to save information in a Model for
reuse within a session by same user.&nbsp;&nbsp;In other words, trying
to figure if possible to have:<br>&gt; @x-avalon.lifestyle type=3Dsession<b=
r>&gt; instead of<br>&gt; @x-avalon.lifestyle type=3Dsingleton<br><br>You c=
an use &quot;context&quot; 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>&gt;<br>&gt; TIA<br>&gt; -Raj<br>&gt; -----Original Message-----<br>&gt;=
 From: Shash Chatterjee &lt;<a href=3D"mailto:[email protected]">shash@badfw.=
org
</a>&gt;<br>&gt; Date: Wed, 12 Oct 2005 22:10:35 -0500<br>&gt; 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>&gt;<br>&gt; Subject: Re: [Keelgroup] oracle config<br>&gt;<br>&gt; Wha=
'dya know!!!!&nbsp;&nbsp;I type the error in Google, and out pops three hit=
s,<br>&gt; all related to Keel!<br>&gt;<br>&gt; This one has the answer:<br=
>&gt;=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>&gt;<br>&gt;<br>
&gt; &gt; Thanks Shash,<br>&gt; &gt; I changed log level from &quot;WARN&qu=
ot; to &quot;DEBUG&quot; for svc-persist-default.<br>&gt; &gt; It was alrea=
dy at &quot;DEBUG&quot; in svc-persist-base.&nbsp;&nbsp;But that didn't hel=
p<br>&gt; &gt; solve the mystery.&nbsp;&nbsp;Actually when I attempt:
<br>&gt; &gt; <a href=3D"http://localhost:8080/default/model.do?model=3Dcre=
atedb&amp;db=3D&quot;wrapps&quot;">http://localhost:8080/default/model.do?m=
odel=3Dcreatedb&amp;db=3D&quot;wrapps&quot;</a><br>&gt; &gt; &lt;<a href=3D=
"http://localhost:8080/default/model.do?model=3Dcreatedb&amp;db=3D%22raj-db=
%22">
http://localhost:8080/default/model.do?model=3Dcreatedb&amp;db=3D%22raj-db%=
22</a>&gt;<br>&gt; &gt; the only log entry that changes is client.log.<br>&=
gt; &gt; BTW, I am using the code you sent me as-is.&nbsp;&nbsp;I've not ch=
anged the id
<br>&gt; &gt; attribute other than the jdbc-url, user, and password for my =
db. And<br>&gt; &gt; that's why using &quot;wrapps.&quot;<br>&gt; &gt;<br>&=
gt; &gt;<br>&gt; &gt; It is still the same error:<br>&gt; &gt; Could not re=
turn a reference to the Component
<br>&gt; &gt; (Key=3D'org.keel.services.persist.PersistentFactory/wrapps')<=
br>&gt; &gt; org.keel.services.model.ModelException: Could not return a ref=
erence<br>&gt; &gt; to the Component<br>&gt; &gt; (Key=3D'org.keel.services=
.persist.PersistentFactory
/wrapps')<br>&gt; &gt; ...<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; at org.keel=
.servers.direct<br>&gt; &gt; .KeelDirectServer$MultiThreadedProcessor.run(K=
eelDirectServer.java:271)<br>&gt; &gt; Caused by: java.lang.IllegalArgument=
Exception: Unknown=20
java.sql.Types<br>&gt; &gt; type -104<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; =
at<br>&gt; &gt; org.keel.services.persist.base.JDBCDatabaseType.typeToStrin=
g(JDBCDatabaseType.java:1091)<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; at<br>&g=
t; &gt; org.keel.services.persist.base.OracleDatabaseType.setDataSource
(OracleDatabaseType.java:93)<br>&gt; &gt; ...<br>&gt; &gt;<br>&gt; &gt; Tha=
nks.<br>&gt;<br>&gt;<br>&gt;<br>&gt; <a href=3D"http://keelframework.org/do=
cumentation.shtml">http://keelframework.org/documentation.shtml</a><br>&gt;=
 Keelgroup mailing list
<br>&gt; <a href=3D"mailto:[email protected]">Keelgroup@lis=
ts.keelframework.com</a><br>&gt; <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==--