Hi Justin!
Wow! I can't think you enough!! I was confused by the bugs you pointed out,
since I didn't realize they are bugs.
I had been going through the XML files themselves and things made more
sense to me. I'll try this forst chance I get and let you know how I make
out.
Thanks again! This was really, really nic of you! I'll try to do it just as
you describe.
Jim
--On Wednesday, May 10, 2000 3:59 AM +0100 Justin Forder
<[EMAIL PROTECTED]> wrote:
> Jim
>
> I have spent some time investigating this, and have some of the answers.
>
> I took the deployment descriptors that were in Rickard's
> deployed classes directory, and stripped them down to the bits relevant
> to a single CMP entity (Account, with its ejb reference removed).
>
> I then used EJX to generate new deployment descriptors (ejb-jar.xml,
> jboss.xml, jaws.xml) from scratch, trying to match the stripped-down
> targets. I got close - there are a couple of issues left that will need
> someone else's help. (Look for ***** markers below)
>
> Here's the process, step by step:
>
> 1. Create an ejb-jar for an Account bean with CMP
>
> Start EJX, click on New, select EJB1.1 XML
>
> Expand the EJBJar tree node, select Enterprise beans.
>
> In the right-hand pane, click Add entity bean, and in the resulting
> dialog give it the EJB name: Account.
>
> Expand the Enterprise Beans tree node, select Account.
>
> Fill in the details:
> Display name: Account
> Remote interface: org.ejboss.test.bank.interfaces.Account
> Home interface: org.ejboss.test.bank.interfaces.AccountHome
> Bean class: org.ejboss.test.bank.interfaces.AccountBeanCMP
> Primary key field: id
> Primary key class: java.lang.String
> Persistence type: Container managed
> Reentrant: Reentrant
>
> Click Add CMP field and give the name: id
> Click Add CMP field and give the name: balance
> Click Add CMP field and give the name: owner
>
> In the CMP tab, type in descriptions for these fields:
> Account Id
> Account balance
> Account owner name
>
> Save as ejb-jar (this matches Rickard's content perfectly)
>
> 2. Create a jboss.xml deployment descriptor for the Account bean
>
> In EJX, click on Open, use Files of type: jBoss XML, and open
> the ejb-jar.xml you just saved.
>
> Expand the jboss and Deployed beans tree nodes, and select Account.
> In the Entity tab, enter
>
> JNDI name: bank/Account
> Container configuration: CMP EntityBean
> (you can copy and paste this from the CMP EntityBean container
> configuration)
>
> Look at the CMP Entity Bean container configuration. Ensure you have the
> right JRMP container invoker for your JDK version.
>
> Set Persistence manager: JAWS O/R CMP
>
> If you want the smallest possible XML file, delete the container
> configurations you are not using. (Right button on the tree node and
> select Remove.)
>
> Save (no prompt for a file name - it saves as jboss.xml in the directory
> you found the ejb-jar.xml in).
>
> ***** The resulting jboss.xml file matches the target
> ***** except for one minor difference - it has
> ***** <secure>true</secure> where Rickard has
> ***** <secure>false</secure>.
>
> 3. Create a jaws.xml CMP deployment descriptor for the Account bean
>
> In EJX, click on Open, use Files of type: JAWS XML, and open
> the ejb-jar.xml again.
>
> Expand JAWS configuration tree node, select Deployed beans.
>
> In the Enterprise beans tab, enter
> Data source: Hypersonic
> Type mapping: Hypersonic SQL
>
> [BUG: mappings are not displayed properly]
>
> Select Account tree node.
>
> In the Entity tab, enter
> Table name: Account
> Create on deploy: checked
> Remove on un-deploy: not checked
> Tuned updates: not checked
>
> In the CMP mappings tab, fill in the blank fields as follows:
>
> Description Column name SQL type Field name
> ----------- ----------- -------- ----------
> Account owner name owner ejb/Customer owner
> Account id id VARCHAR(256) id
> Account balance balance REAL balance
>
> Finding by primary key is already looked after: you only have
> to add finders that do queries on content. Rickard has one that
> looks for accounts with balances greater than a given parameter.
>
> In the Entity tab, click Add finder
>
> In the Finders tab, enter:
>
> Finder name Order Query
> ----------- ----- -----
> findLargeAccounts balance balance > {0}
>
> If you want to keep your XML file size to a minimum, delete the type
> mappings for the databases you are not using (Right button on the tree
> node and select Remove.)
>
> Save (no prompt for a file name - saves as jaws.xml in the directory you
> found the ejb-jar.xml in).
>
> ***** THIS DOES NOT POPULATE THE <jdbc-type> ELEMENTS IN THE jaws.xml.
>
> Rickard's jaws.xml had VARCHAR for the id, REAL for the balance, and REF
> for the owner.
>
> So close...
>
> regards
>
> Justin
>
>
> In message <[EMAIL PROTECTED]>, Jim
> Archer <[EMAIL PROTECTED]> writes
>> Hi ALl...
>>
>> When using ejx to generate the ejboss.xml file, to deploy a CMP bean,
>> there are at least two choices when configuring the Container->CMP
>> EntityBean under Persistence Manager: CMP Persistence and JAWS.
>>
>> If I don't select JAWS, do I need to generate a jaws.xml file? If not,
>> do I need to do anything?
>>
>> If I do select jaws and generate a jaws.xml file, I'm not sure what to
>> enter in many of the settings. For example, it appears I have to enter
>> all my finder methods and write SQL queries, but what part of the query
>> do I write and how do I represent passed in arguments?
>>
>> Also, under "type mappings," is it necessary to complete this for the
>> database I am using, or is this known by the server as it was in EJBoss
>> 1.0? If do have to enter it, is that info listed anywhere, maybe in an
>> EJBoss 1.0 properties file?
>>
>> Thanks...
>>
>> Jim
>>
>>
>>
>> --
>> --------------------------------------------------------------
>> To subscribe: [EMAIL PROTECTED]
>> To unsubscribe: [EMAIL PROTECTED]
>> Problems?: [EMAIL PROTECTED]
>>
>
> --
> Justin Forder
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]