Can't help with your first question, but can with the second:

In your ejb-jar.xml file(s) there is a section called <assembly-descriptor>
and within that, you can set up security roles on methods, etc but can also
define container transactions in a section called (you guessed it)
<container-transaction> which looks like this:

<assembly-descriptor>
.
.
.
    <container-transaction>
     <description> Give this a required transaction </description>
     <method>
          <ejb-name>YourEJBName</ejb-name>
          <method-intf>Remote</method-intf>
          <method-name>deposit</method-name>
     </method>
     <method>
     .
     </method>
     .
     .
     List all of your methods for which you want a 'required transaction'
    <trans-attribute>Required<trans-attribute>
   </container-transaction>

Check out the ejb specs at java.sun.com as they describe all of this quite well.
The GUI tools often hide what is going on! (good & bad) 
--- [EMAIL PROTECTED] wrote
 :
> Hello everyone,
> I am new to orion server and am trying to find out how to use
> transaction handling within orion. Now within the datasource.xml file.
> I have got something like this
> 
> <data-source
>           class="com.evermind.sql.DriverManagerDataSource"
>           name="OracleDS"
>           location="jdbc/OracleCoreDS"
>           source-location = "c:\orion\j2ee\home\orion.jar"
>           xa-location="jdbc/xa/OracleXADS"
>           ejb-location="jdbc/OracleDS"
>           connection-driver="oracle.jdbc.driver.OracleDriver"
>           username="scott"
>           password="tiger"
>           url="jdbc:oracle:thin:@192.168.0.5:1521:dcom"
>           inactivity-timeout="30"
>      />
> 
> In this case when I am using the code in the client as
> 
> InitialContext ic = new InitialContext();
> DataSource ds = (DataSource)ic.lookup("jdbc/OracleDS");
> Connection con = ds.getConnection();
> 
> then the pooled connection happens. As I understand there is a place where the 
>transactions can
> be rolled back if an
> 'EJBException' is thrown by the container. Now the doubt is that this does not 
>happen with the
> OracleDS.
> 
> So I thought that I should use the
> 
> class="com.evermind.sql.DriverManagerXADataSource" in the xml file
> 
> and in the client code use
> 
> DataSource ds = (DataSource)ic.lookup("jdbc/xa/OracleXADS");
> 
> The problem is that the server does not start saying that it needs the 
>source-location. can
> anyone
> help me out on this? Thanks
> 
> i would also like to know how to say 'transaction' required for one of the function 
>of my EJB in
> orion.
> I could do this in the J2EE RI using the deploytool, but I am totally lost here.
> 
> Thanks in advance
> 
> Regards
> Aby
> 
> 


__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/

Reply via email to