1.  Look at the quickstart guide from the sourceforge download page for the
broadest overview of how to use jboss 3.  However, it looks like you
figured out the main points of what you need to do.

2. Turn on trace level logging for at least org.jboss.deployment and
org.jboss.system.  This should tell you why your mckoi db mbean isn't
getting started nor the connectionmanager.RARDeployment mbean.

3. I never thought of having an embedded mbean that doesn't correspond to
an ObjectName valued attribute.  This might not work.  Try making your
mckoi db mbean a separate mbean with an explicit depends to it, as in the
hsqldb example, rather than embedding the mckoi mbean inside the cm
configuration.  Please let me know whether or not this is the problem.

If this doesn't help, please post the trace level logging from (2)

Thanks
david jencks

On 2002.06.13 11:40:55 -0400 Howard M. Lewis Ship wrote:
> I'm in the middle of upgrading from JBoss 2.4.3 to JBoss 3.0.0.  I like
> much
> of what I see, but I'm having trouble clearing one key hurdle.
> 
> My database is driven by McKoiDB 0.92; I created a simple MBean to start
> McKoi as a thread inside JBoss, and created a datasource for it:
> 
> [2.4.3 jboss.jcml]
> 
>   <mbean code="net.sf.tapestry.contrib.mckoi.McKoiDB"
> name="DefaultDomain:service=McKoiDB">
>    <attribute name="RootPath">../db</attribute>
>    <attribute name="ConfigPath">../db/vlib.conf</attribute>
>   </mbean>
> 
>   <mbean code="org.jboss.jdbc.JdbcProvider"
> name="DefaultDomain:service=JdbcProvider,name=McKoiDB">
>     <attribute name="Drivers">com.mckoi.JDBCDriver</attribute>
>   </mbean>
> 
>   <mbean code="org.jboss.jdbc.XADataSourceLoader"
> name="DefaultDomain:service=XADataSource,name=XAVlib">
>     <attribute name="PoolName">McKoiDB</attribute>
>     <attribute
> name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attr
> ibute>
>     <attribute name="Properties"/>
>     <attribute name="URL">jdbc:mckoi://localhost/</attribute>
>     <attribute name="GCMinIdleTime">1200000</attribute>
>     <attribute name="JDBCUser">admin</attribute>
>     <attribute name="MaxSize">10</attribute>
>     <attribute name="Password">secret</attribute>
>     <attribute name="GCEnabled">false</attribute>
>     <attribute name="InvalidateOnError">false</attribute>
>     <attribute name="TimestampUsed">false</attribute>
>     <attribute name="Blocking">true</attribute>
>     <attribute name="GCInterval">120000</attribute>
>     <attribute name="IdleTimeout">1800000</attribute>
>     <attribute name="IdleTimeoutEnabled">false</attribute>
>     <attribute name="LoggingEnabled">false</attribute>
>     <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
>     <attribute name="MinSize">0</attribute>
>   </mbean>
> 
> 
> Now, everything's changed in 3.0.0; I've been blindly attempting to hack
> the
> sample HSQL service into a McKoi service:
> 
> <server>
> <!--
> ==================================================================== -->
> <!-- New ConnectionManager setup for default hsql dbs -->
> <!-- Build jmx-api (build/build.sh all) and view for config
> documentation -->
> <!--
> ==================================================================== -->
> <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager"
> name="jboss.jca:service=LocalTxCM,name=McKoiDBDataSource">
> <depends>
> <mbean code="net.sf.tapestry.contrib.mckoi.McKoiDB"
> name="jboss:service=McKoiDB">
> <attribute name="RootPath">../server/tapestry/db</attribute>
> <attribute name="ConfigPath">../server/tapestry/db/vlib.conf</attribute>
> </mbean>
> </depends>
> <depends optional-attribute-name="ManagedConnectionFactoryName">
> <!--embedded mbean-->
> <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
> name="jboss.jca:service=LocalTxDS,name=McKoiDBDataSource">
> <attribute name="JndiName">McKoiDB</attribute>
> <attribute name="ManagedConnectionFactoryProperties">
> <properties>
> <config-property name="ConnectionURL"
> type="java.lang.String">jdbc:mckoi://localhost/</config-property>
> <config-property name="DriverClass"
> type="java.lang.String">com.mckoi.JDBCDriver</config-property>
> <config-property name="UserName"
> type="java.lang.String">admin</config-property>
> <config-property name="Password"
> type="java.lang.String">secret</config-property>
> </properties>
> </attribute>
> <!--Below here are advanced properties -->
> <!--hack-->
> <depends
> optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,n
> ame=JBoss LocalTransaction JDBC Wrapper</depends>
> <depends>jboss:service=McKoiDB</depends>
> </mbean>
> </depends>
> <depends optional-attribute-name="ManagedConnectionPool">
> <!--embedded mbean-->
> <mbean
> code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool"
> name="jboss.jca:service=LocalTxPool,name=McKoiDB">
> <attribute name="MinSize">0</attribute>
> <attribute name="MaxSize">50</attribute>
> <attribute name="BlockingTimeoutMillis">5000</attribute>
> <attribute name="IdleTimeoutMinutes">15</attribute>
> <!--criteria indicates if Subject (from security domain) or app supplied
> parameters (such as from getConnection(user, pw)) are used to distinguish
> connections in the pool. Choices are
> ByContainerAndApplication (use both),
> ByContainer (use Subject),
> ByApplication (use app supplied params only),
> ByNothing (all connections are equivalent, usually if adapter supports
> reauthentication)-->
> <attribute name="Criteria">ByContainer</attribute>
> </mbean>
> </depends>
> <depends
> optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedCo
> nnectionManager</depends>
> <depends
> optional-attribute-name="JaasSecurityManagerService">jboss.security:name=Jaa
> sSecurityManager</depends>
> <attribute name="TransactionManager">java:/TransactionManager</attribute>
> <!--make the rar deploy! hack till better deployment-->
> <depends>jboss.jca:service=RARDeployer</depends>
> </mbean>
> </server>
> 
> 
> 
> When I start up JBoss, things look ok:
> 
> 08:33:55,757 INFO  [MainDeployer] Starting deployment of package:
> file:/C:/Work/jboss-3.0.0/server/tapestry/deploy/mckoi-service.xml
> 08:33:56,879 WARN  [ServiceController]
> jboss.jca:service=LocalTxDS,name=McKoiDBDataSource does not implement any
> Service methods
> 08:33:56,889 WARN  [ServiceController]
> jboss.jca:service=LocalTxDS,name=McKoiDBDataSource does not implement any
> Service methods
> 08:33:56,899 INFO  [JBossManagedConnectionPool] Creating
> 08:33:56,899 INFO  [JBossManagedConnectionPool] Created
> 08:33:58,631 INFO  [STDOUT] TCP JDBC Server (multi_threaded) on port:
> 9157
> 08:33:58,631 INFO  [STDOUT] .
> 08:33:58,631 INFO  [STDOUT] Boot time: 1642ms.
> 08:33:58,642 INFO  [JBossManagedConnectionPool] Starting
> 08:33:58,652 INFO  [JBossManagedConnectionPool] Started
> 08:33:58,662 INFO  [MainDeployer] Successfully completed deployment of
> package: file:/C:/Work/jboss-3.0.0/server/tapestry/deploy/mckoi-service.xml
> 
> And I've verified that McKoi database is running, but my EAR (containing
> my
> CMP entity EJBs) doesn't deploy:
> 
> 08:34:10,348 INFO  [MainDeployer] Starting deployment of package:
> file:/C:/Work/jboss-3.0.0/server/tapestry/deploy/Vlib.ear
> 08:34:10,368 INFO  [EARDeployer] Init J2EE application:
> file:/C:/Work/jboss-3.0.0/server/tapestry/deploy/Vlib.ear
> 08:34:11,991 INFO  [EjbModule] Creating
> 08:34:12,051 INFO  [EjbModule] Deploying Person
> 08:34:12,842 INFO  [EjbModule] Deploying Book
> 08:34:12,882 INFO  [EjbModule] Deploying Publisher
> 08:34:13,032 INFO  [EjbModule] Deploying KeyAllocator
> 08:34:13,122 INFO  [EjbModule] Deploying BookQuery
> 08:34:13,363 INFO  [EjbModule] Deploying Operations
> 08:34:14,975 WARN  [ServiceController] Ignoring request to destroy
> non-existant service: jboss.j2ee:service=EJB,jndiName=vlib/Book
> 08:34:14,985 WARN  [ServiceController] Ignoring request to destroy
> non-existant service: jboss.j2ee:service=EJB,jndiName=vlib/Person
> 08:34:14,995 INFO  [EjbModule] Remove JSR-77 EJB Module:
> jboss.management.single:J2EEApplication=Vlib.ear,J2EEServer=Single,j2eeType=
> EJBModule,name=VlibBeans.jar
> 08:34:15,005 ERROR [EjbModule] Initialization failed
> org.jboss.deployment.DeploymentException: Error: can't find data source:
> java:/McKoiDB; - nested throwable: (javax.naming.NameNotFoundException:
> McKoiDB not bound)
>         at
> org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.<init>(JDBCEntityBrid
> ge.java:99)
>         at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.create(JDBCStoreManager.java
> :332)
>         at
> org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.jav
> a:155)
>         at org.jboss.ejb.EntityContainer.create(EntityContainer.java:337)
>         at org.jboss.ejb.Container.invoke(Container.java:789)
>         at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
>         at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
> 
> And its right, McKoiDB isn't bound into JNDI.
> 
> Can someone point me in the right direction, or to some documentation?
> Things are so changed between 2.4.3 and 3.0.0 that I'm not finding the
> JBoss
> book very helpful.
> 
> Thanks,
> 
> Howard
> 
> (Not used to being on this side of the begging-for-help equation).
> 
> 
> 
> _______________________________________________________________
> 
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas - 
>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

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

Reply via email to