I'm piecing together the profile for DB2, if someone would comment and help
me tweak this I'd appreciate it. I'm trying to put together some code in a
hurry to do some performance testing and need to do it against DB2. I'm
hoping to use appfuse on this project so I need to figure out how to set
appfuse up to use DB2. We're using DB2 version 9.5, the driver is in a zip
file called db2java.zip.
Here's the profile I've got so far, can anyone take a look at this and tell
me if it's correct?:
<profile>
<id>db2</id>
<properties>
<hibernate.dialect>org.hibernate.dialect.DB2Dialect</hibernate.dialect>
<jdbc.groupId>com.ibm</jdbc.groupId>
<jdbc.artifactId>db2jcc</jdbc.artifactId>
<jdbc.version>3.50.152</jdbc.version>
<jdbc.driverClassName>COM.ibm.db2.jdbc.app.DB2Driver</jdbc.driverClassName>
<jdbc.url><![CDATA[jdbc:db2://myhost:50000/mydb]]></jdbc.url>
<jdbc.username>foo</jdbc.username>
<jdbc.password>bar</jdbc.password>
</properties>
</profile>
The part I'm not sure about are the artifactId. I seems like it should
either be db2jcc or db2java, I'm not sure which is right. I tried running
the following command and it succeeded, so thta may confirm that db2jcc is
correct, but as I'm pretty new to maven I'm not too sure. Here's the
command:
mvn install:install-file
-Dfile=/home/jack/dnlds/java/db2/jdbc.driver/db2java.zip -DgroupId=com.ibm
-DartifactId=db2jcc -Dversion=3.50.152 -Dpackaging=jar -DgeneratePom=true
If anyone would help me figure out if this is the right approach, I'd be
very grateful, tia...
--jack
jackalista wrote:
>
> I'm trying to run down how to configure appfuse to use DB2 so am finding
> a;ll these threads. DB2 *does* have a single zip file for version 9.5 of
> the DB.
>
> What I'm not so clear on is how to set this up. Do I need to create a
> profile in the top pom.xml? What other steps are involved? I'm seeing
> info but some of it appears irrelevant (like the comments about multiple
> jars for the jdbc driver, for ex.). Is there a list that explains how to
> integrate a DB?
>
> Here's what appears to be the necessary steps:
>
> 1. create a profile for DB2
> 2. somehow import the jar (actally a zip file in this case) into my
> project
> 3. set up hibernate to use the DB2 dialect (and where is this now? I'm
> also semi new to appfuse 2.x)
>
> Is that the correct set of steps? Is the complete process spelled out
> anywhere?
>
> thanks...
>
> --j
>
>
>
> mraible wrote:
>>
>> You should be able to. I've tried to use the Derby Driver with DB2,
>> but it didn't work. The main issue we've had in adding DB2 support is
>> the fact that it requires multiple JARs for its JDBC Driver. If you
>> can find a single JAR/artifact we can use, we'd be happy to add
>> support. In the meantime, there's two things you can do:
>>
>> 1. Replace all references to jdbc.* dependencies with the two
>> depdendencies that DB2 requires in pom.xml.
>>
>> 2. Create a pom that has a dependency on the two DB2 artifacts and
>> install it in your local repository.
>>
>> See the following entry (and comments) on my blog for more solutions:
>>
>> http://raibledesigns.com/rd/entry/database_profiles_in_appfuse_2
>>
>> Matt
>>
>> On 9/26/07, meisam4910 <[EMAIL PROTECTED]> wrote:
>>>
>>> does Appfuse work with IBM DB2 ? in its database list i could not found
>>> the
>>> DB2 name :(( is there any way to use DB2 with appfuse ?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/IBM-DB2-tf4521471s2369.html#a12898330
>>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> http://raibledesigns.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/IBM-DB2-tp12898330s2369p20079177.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]