Hi Andrew,

Zhou, Andrew wrote:
Hi Guys,
Just new to this OJB world. Quite exciting.

Well I am trying to create a simple stateless session bean using OJB to
do database related work. My environment is as follows,
Weblogic 7.2 SP2
OJB 1.0.rc3
Oracle9i


rc3 is really outdated (recommend to update to rc6 or upcoming next version).


Do you follow the instructions made in
http://db.apache.org/ojb/deployment.html#Deployment%20in%20EJB%20based%20applications

(be careful, this document is based on latest release, to generate local docs call 'ant htmldoc')

OJB was shipped with a bunch of ejb examples. These (junit based) examples all passed on JBoss.


When I run this, the new UserID is not stored in Database. I created a
Pool, using oracle.jdbc.driver.OracleDriver. I am not sure if this is
correct. I also tested a XA Pool based on
oracle.jdbc.xa.client.OracleXADataSource, but this one give me
transaction exceptions.



you have to use DataSource defined in your application server, by default these connection will be integrated in JTA - that's all.


Another problem is that, in repository.xml, I can only do,
jndi-datasource-name="MyDataSource"
but not
jndi-datasource-name="java:com/env/jdbc/testDB"

hmm, why not? This should be possible. Internal OJB do (ConnectionFactoryAbstractImpl class) an "normal" JNDI lookup to get the datasource instance.


regards,
Armin

Even though I have a resource-ref created in weblogic-ejb-jar.xml,
<resource-description>
<res-ref-name>jdbc/titanDB</res-ref-name>
<jndi-name>MyDataSource</jndi-name>
</resource-description>


Well, I am wondering if some developer on this list had experienced same problem or has some possible solutions. If you can share with me and rest of this group with your experience, any help is highly appreciated.


Regards -Andrew




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to