It has been a few years since I have deployed webobjects apps on jboss but the 
jndi way worked well.  You could use the same war file in dev and production.  
You just changed the datasource file which was not in the war.  In our case the 
datasource file was 

/usr/local/jboss/server/default/deploy/postgres-ds.xml

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>PostgresDS</jndi-name>
    <connection-url>jdbc:postgresql://mydbhostname:5432/mydb</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>mydbuser</user-name>
    <password>mypassword</password>
      <metadata>
         <type-mapping>PostgreSQL 8.0</type-mapping>
      </metadata>
  </local-tx-datasource>
</datasources>

Then for our WebObjects app to use this datafile, in our war's web.xml we had

  <resource-ref>
    <description>The data source to be used by EOF. If there are multiple data 
sources,
                 then the definition below must be used to configure which JDBC 
URL (Model) should
                 use which data source. If EOF should use a JDBC driver 
directly, this section must be commented out</description>
    <res-ref-name>jdbc/DefaultDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>

And in our jboss-web.xml, also in the war we had

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
  "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd";>
    
<jboss-web>
<!-- This property should correspond to the jdbc connection pool set up on jboss
It is also referenced in web.xml.template.  It is not needed if using jdbc 
directly.
 -->
  <resource-ref>
    <res-ref-name>jdbc/DefaultDataSource</res-ref-name>
    <jndi-name>java:/PostgresDS</jndi-name>
  </resource-ref>
</jboss-web>

Cheers

Tim


On 05/03/2011, at 7:58 PM, Matteo Centro wrote:

> Thanks, 
> 
> actually I was trying to fix the problem simply passing a parameter 
> -Dsomething in the launch parameters but I can't find anything.
> 
> 
> Matteo Centro
> 
> Altera 
> via Vergerio 25
> 35126 Padova
> www.altera.it
> 
> tel. +39.049.8705492
> mob. +39.348.7275442
> fax. +39.049.8591593
> 
> 
> P Please consider the environment before printing this email
> 
> 
> RISPETTO DELLA PRIVACY
> Il testo e gli eventuali documenti trasmessi possono contenere informazioni 
> riservate indirizzate in via esclusiva ai destinatari indicati. E' vietata la 
> riproduzione di qualsiasi contenuto di questo messaggio senza l'espressa 
> autorizzazione del mittente. Qualora abbiate ricevuto questo messaggio per 
> errore siete pregati di darne immediata comunicazione al mittente 
> all'indirizzo dello stesso e di provvedere immediatamente alla eliminazione 
> del messaggio e dei suoi allegati.
> 
> 
> 
> On 28/feb/2011, at 22.32, Q wrote:
> 
>> You might want to look into either deploying using JNDI to define the JDBC 
>> datasource, or using container defined properties to override the connection 
>> in deployment.
>> 
>> I don't have any experience with doing either within a WAR deployment, but 
>> it's what I would be looking at if I were trying to do it myself.
>> 
>> On 01/03/2011, at 6:00 AM, Matteo Centro wrote:
>> 
>>> Hi all,
>>> 
>>> for the first time we have to deploy one of our apps (built on WO 5.4.3 
>>> using some of the WOnder frameworks) on a JBoss 4.3.
>>> The app was built without thinking of JBoss, it's simply a WO app, we 
>>> learned that we had to deploy on JBoss a couple of hours before the actual 
>>> deployment.
>>> We built a gigantic WAR file (30Mb) with all the frameworks inside and it 
>>> worked.
>>> 
>>> The problem is that it worked in our client's test environment, now they 
>>> need to move it on a PreProduction environment and of course the JDBC 
>>> connection dictionary will be totally different.
>>> 
>>> In a normal deployment (using WO app server) I would simply change the 
>>> connection dictionary either in the model file or in a Properties file.
>>> Here I'm puzzled and I don't know where to begin since the WAR file is 
>>> monolithic.
>>> 
>>> Any suggestions? 
>>> 
>>> 
>>> Thanks in advance,
>>> 
>>> 
>>> Matteo Centro
>>> 
>>> Matteo Centro
>>> 
>>> Altera 
>>> via Vergerio 25
>>> 35126 Padova
>>> www.altera.it
>>> 
>>> tel. +39.049.8705492
>>> mob. +39.348.7275442
>>> fax. +39.049.8591593
>>> 
>>> 
>>> P Please consider the environment before printing this email
>>> 
>>> 
>>> RISPETTO DELLA PRIVACY
>>> Il testo e gli eventuali documenti trasmessi possono contenere informazioni 
>>> riservate indirizzate in via esclusiva ai destinatari indicati. E' vietata 
>>> la riproduzione di qualsiasi contenuto di questo messaggio senza l'espressa 
>>> autorizzazione del mittente. Qualora abbiate ricevuto questo messaggio per 
>>> errore siete pregati di darne immediata comunicazione al mittente 
>>> all'indirizzo dello stesso e di provvedere immediatamente alla eliminazione 
>>> del messaggio e dei suoi allegati.
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-deploy mailing list      (Webobjects-deploy@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-deploy/qdolan%40gmail.com
>>> 
>>> This email sent to qdo...@gmail.com
>> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-deploy mailing list      (Webobjects-deploy@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-deploy/tim%40triptera.com.au
> 
> This email sent to t...@triptera.com.au

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list      (Webobjects-deploy@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to