User: user57  
  Date: 01/08/30 15:29:25

  Added:       src/docs/minerva/examples ejb-jar.xml.txt index.html
                        jboss.conf jboss.jcml jboss.properties
                        jboss.xml.txt
  Log:
   o moved *everything* to src/docs
  
  Revision  Changes    Path
  1.1                  newsite/src/docs/minerva/examples/ejb-jar.xml.txt
  
  Index: ejb-jar.xml.txt
  ===================================================================
  <?xml version="1.0" encoding="Cp1252"?>
  
  <ejb-jar>
       <description>EMAX Researcher Desktop Server</description>
       <display-name>ERD</display-name>
       <enterprise-beans>
         <session>
         <ejb-name>MySession</ejb-name>
         <home>com.test.MySessionHome</home>
         <remote>com.test.MySession</remote>
         <ejb-class>com.test.MySessionBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
         <env-entry>
           <env-entry-name>Variable</env-entry-name>
           <env-entry-type>java.lang.String</env-entry-type>
           <env-entry-value>stuff</env-entry-value>
         </env-entry>
         <resource-ref>
           <res-ref-name>jdbc/MySessionDB</res-ref-name>
           <res-type>javax.sql.DataSource</res-type>
           <res-auth>Container</res-auth>
         </resource-ref>
         </session>
       </enterprise-beans>
       <assembly-descriptor>
         <container-transaction>
         <description>Requisition Transaction Properties</description>
         <method>
           <ejb-name>MySession</ejb-name>
           <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
         </container-transaction>
       </assembly-descriptor>
     </ejb-jar>
  
  
  
  1.1                  newsite/src/docs/minerva/examples/index.html
  
  Index: index.html
  ===================================================================
  <html>
  
        <head>
                <title>Minerva &amp; JBoss Complete Example</title>
        </head>
  
        <body>
                <h1>Minerva &amp; JBoss Complete Example</h1>
                <p>Here's an example of a JBoss and EJB configuration using Minerva. 
It uses an Oracle database, though certain names and passwords have been changed to 
protect the innocent.</p>
                <p><b>JBoss Configuration Files</b></p>
                <p>These files configure the entire JBoss server. Though this example 
uses only one pool, you can add more pools (for the same or other databases and DBMSs) 
simply by repeating the blocks in jboss.conf and jboss.jcml and changing the pool name 
and configuration. One bean may use multiple pools, though CMP beans can only have the 
container use one pool per bean for the work it does.</p>
                <ul>
                        <li><a href="jboss.conf">jboss.conf</a> - the minerva MBean is 
buried in there toward the end.
                        <li><a href="jboss.jcml">jboss.jcml</a> - remember, you don't 
need to add <i>all</i> these configuration parameters, just the ones you want to 
override. The server will update this file with all the parameters and their default 
values once you start it successfully.
                        <li><a href="jboss.properties">jboss.properties</a> - you only 
need to change the &quot;jdbc.drivers=&quot; line here
                </ul>
                <p><b>EJB Configuration Files</b></p>
                <p>These files go in the JAR with your EJB code.
                <ul>
                        <li><a href="ejb-jar.xml.txt">ejb-jar.xml</a> - this is common 
to all EJB 1.1 servers.
                        <li><a href="jboss.xml.txt">jboss.xml</a> - this is specific 
to JBoss.
                </ul>
                <p><b>EJB Implementation</b></p>
                <p>The code to access the pool uses the &quot;res-ref-name&quot; 
specified in the ejb-jar.xml file. In this example, it was 
&quot;jdbc/MySessionDB&quot;, and of course you need the usual 
&quot;java:comp/env&quot;, so the resulting code looks like:</p>
                <pre>
  
  try {
  
        InitialContext ctx = new InitialContext();
  
        DataSource ds = 
(DataSource)ctx.lookup(&quot;java:comp/env/jdbc/MySessionDB&quot;);
  
        Connection con = ds.getConnection();
  
        PreparedStatement ps = con.prepareStatement(sql);
  
        ...
  
  } catch(NamingException e) {
  
        ...
  
  } catch(SQLException e) {
  
        ...
  
  }
  
  </pre>
                <p><b>Troubleshooting</b></p>
                <p>The most common problem right now is that the Minerva pools are 
sometimes loaded after the auto-deployer, so your beans try to deploy before the pools 
exist. In that case, they tend to get naming exceptions and fail to deploy. Look for 
an output line like:<br>
                <code>[XADataSource] XA Connection pool foo bound to foo</code><br>
                and that is when the pool has started.</p>
                <p>If this is the case for you, there's little you can do. Sometimes 
if you try again it will work, since it seems to be dependent in some way on your 
configuration which may change slightly over time. This should be fixed by the JMX 
update which will be forthcoming very soon.</p>
                <p>If you're a real hacker (<i>warning!</i>) and desperate to get this 
to work right now, you can find the last property set on the pool in jboss.jcml, 
locate the setter for that property in org.jboss.jdbc.XADataSourceLoader.java, and 
move the line for <code>initializePool();</code> from <code>startService</code> to the 
end of that setter and recompile. Don't say I didn't warn you.</p>
        </body>
  
  </html>
  
  
  
  1.1                  newsite/src/docs/minerva/examples/jboss.conf
  
  Index: jboss.conf
  ===================================================================
  <MLET CODE = "org.jboss.logging.Logger" ARCHIVE="jboss.jar" CODEBASE="../lib/ext/">
  </MLET>
  
  
  <MLET CODE = "org.jboss.logging.ConsoleLogging" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
     <ARG TYPE="java.lang.String" VALUE="Information,Debug,Warning,Error">
     <ARG TYPE="java.lang.String" VALUE="[{2}] {4}">
  </MLET>
  
  <MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
     <ARG TYPE="java.lang.String" VALUE="../../log/">
  </MLET>
  
  <MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
     <ARG TYPE="java.lang.String" VALUE="../../tmp/">
  </MLET>
  
  <MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
     <ARG TYPE="java.lang.String" VALUE="../../db/">
  </MLET>
  
  <MLET CODE = "org.jboss.util.Info" ARCHIVE="jboss.jar" CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
     <ARG TYPE="java.lang.String" VALUE="./">
  </MLET>
  
  <MLET CODE = "org.jboss.jdbc.JdbcProvider" ARCHIVE="jboss.jar,idb.jar,hsql.jar" 
CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE = "org.jboss.web.WebService" ARCHIVE="jboss.jar,dynaserver.jar" 
CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE = "org.jboss.naming.NamingService" ARCHIVE="jnpserver.jar" 
CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE = "org.jboss.tm.TransactionManagerService" 
ARCHIVE="jboss.jar,jta-spec1_0_1.jar" CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE = "org.jboss.security.SimpleRealmMappingService" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE = "org.jboss.security.EJBSecurityManagerService" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
      <ARG TYPE="java.lang.String" VALUE="OracleDB">
      <ARG TYPE="java.lang.String" VALUE="org.jboss.minerva.xa.XADataSourceImpl">
  </MLET>
  
  <MLET CODE = "org.jboss.ejb.ContainerFactory" 
ARCHIVE="jboss.jar,ejb.jar,jnp-client.jar,ejxeditor.jar,ejxjboss.jar" 
CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE = "org.jboss.ejb.AutoDeployer" ARCHIVE="jboss.jar">
    <ARG TYPE="java.lang.String" VALUE="../deploy/">
  </MLET>
  
  <MLET CODE = "org.jboss.jmx.server.JMXAdaptorService" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
  </MLET>
  
  <MLET CODE = "com.sun.jdmk.comm.HtmlAdaptorServer" ARCHIVE="jmxtools.jar" 
CODEBASE="../lib/ext/" NAME="Adaptor:name=html">
  </MLET>
  
  <MLET CODE = "org.jboss.configuration.ConfigurationService" 
ARCHIVE="jboss.jar,xml.jar" CODEBASE="../lib/ext/">
  </MLET>
  
  <!-- 
    --  Uncomment this to add Tomcat support.  Be sure to set your 'TOMCAT_HOME' 
    -- environment variable before starting JBoss.
    -- MLET CODE = "org.jboss.tomcat.TomcatService" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
    -- /MLET>
    -->
  
  <!-- 
    -- Uncomment this to add SpyderMQ support.  Be sure to set your 'SPYDERMQ_HOME' 
    -- environment variable before starting JBoss.  You'll also need to copy the 
    -- spyderMQ.properties file from your SpyderMQ installation to you JBoss 
    -- installation conf dir.
    -- MLET CODE = "org.jboss.spydermq.SpyderMQService" ARCHIVE="jboss.jar" 
CODEBASE="../lib/ext/">
    -- /MLET>
    -->
  
  
  
  1.1                  newsite/src/docs/minerva/examples/jboss.jcml
  
  Index: jboss.jcml
  ===================================================================
  <server>
       <mbean name="Adaptor:name=html">
         <attribute name="MaxActiveClientCount">10</attribute>
         <attribute name="Parser" />
         <attribute name="Port">8082</attribute>
       </mbean>
       <mbean name="DefaultDomain:service=MLet">
         <attribute name="LibraryDirectory">C:\home\jboss\dist\bin</attribute>
       </mbean>
       <mbean name="DefaultDomain:service=Logging,type=Console">
         <attribute name="Format">[{2}] {4}</attribute>
       </mbean>
       <mbean name="DefaultDomain:service=Webserver">
         <attribute name="Port">8083</attribute>
       </mbean>
       <mbean name="EJB:service=ContainerFactory">
         <attribute name="VerifyDeployments">true</attribute>
       </mbean>
       <mbean name="DefaultDomain:service=XADataSource,name=OracleDB">
         <attribute name="Properties"></attribute>
         <attribute 
name="URL">jdbc:oracle:thin:@oracleserver.domain.com:1521:instance</attribute>
         <attribute name="GCMinIdleTime">1200000</attribute>
         <attribute name="MaxSize">10</attribute>
         <attribute name="Password">password</attribute>
         <attribute name="ShrinkPercent">0.33</attribute>
         <attribute name="GCEnabled">false</attribute>
         <attribute name="TimestampUsed">false</attribute>
         <attribute name="Blocking">false</attribute>
         <attribute name="GCInterval">120000</attribute>
         <attribute name="JDBCUser">username</attribute>
         <attribute name="MinSize">0</attribute>
         <attribute name="ShrinkMinIdleTime">600000</attribute>
         <attribute name="ShrinkingEnabled">false</attribute>
         <attribute name="LoggingEnabled">true</attribute>
       </mbean>
     </server>
  
  
  1.1                  newsite/src/docs/minerva/examples/jboss.properties
  
  Index: jboss.properties
  ===================================================================
  # System properties
  # These will be loaded and set by jBoss   
  java.rmi.server.useLocalHostName=true
  java.rmi.server.hostname=jbossserver.domain.com
  #java.rmi.server.codebase=http://localhost:8080/
     
  jdbc.drivers=oracle.jdbc.driver.OracleDriver
  
  
  
  1.1                  newsite/src/docs/minerva/examples/jboss.xml.txt
  
  Index: jboss.xml.txt
  ===================================================================
  <?xml version="1.0" encoding="Cp1252"?>
  
  <jboss>
       <secure>true</secure>
       <container-configurations>
         <container-configuration 
configuration-class="org.jboss.ejb.deployment.StatelessSessionContainerConfiguration">
         <container-name>Default Stateless SessionBean</container-name>
         <call-logging>false</call-logging>
         
<container-invoker>org.jboss.ejb.plugins.jrmp13.server.JRMPContainerInvoker</container-invoker>
         
<instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-pool>
         <instance-cache></instance-cache>
         <persistence-manager></persistence-manager>
         <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
         <container-invoker-conf>
           <Optimized>false</Optimized>
         </container-invoker-conf>
         <container-pool-conf>
           <MaximumSize>100</MaximumSize>
           <MinimumSize>10</MinimumSize>
         </container-pool-conf>
         </container-configuration>
       </container-configurations>
       <resource-managers>
         <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
         <res-name>OracleDBResource</res-name>
         <res-jndi-name>OracleDB</res-jndi-name>
         </resource-manager>
       </resource-managers>
       <enterprise-beans>
         <session>
         <ejb-name>MySession</ejb-name>
         <jndi-name>MySessionJNDIName</jndi-name>
         <configuration-name>Default Stateless SessionBean</configuration-name>
         <resource-ref>
           <res-ref-name>jdbc/MySessionDB</res-ref-name>
           <resource-name>OracleDBResource</resource-name>
         </resource-ref>
         </session>
       </enterprise-beans>
     </jboss>
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to