ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roger day <rog3r....@gmail.com>
Subject Re: build multiple targets with data source as a SQL database
Date Thu, 01 Jul 2004 16:38:11 GMT
It's a simple table - a list of names (with other bits of data which
aren't relevant to this part of the project) - and the pseudo code
you've got below is near enough.

I'm trying to build multiple  Message Driven Beans each of which
listens to a different queue, but the Java class within each MDB
remaining the same. An example of the XML  follows:

<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN"
   "http://java.sun.com/dtd/ejb-jar_2_0.dtd"
>
<ejb-jar>
  <enterprise-beans>
    <message-driven>
      <description>Listener for Warehouse Queue</description>
      <ejb-name>AutobuildServiceBean</ejb-name>
      <ejb-class>com.globalgraphics.softwarefactory.bevan.runner.AutobuildServiceBean</ejb-class>
      <transaction-type>Bean</transaction-type>
      <message-selector></message-selector>
      <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
      <message-driven-destination>
        <destination-type>javax.jms.Queue</destination-type>
        <subscription-durability>NonDurable</subscription-durability>
      </message-driven-destination>
    </message-driven>
  </enterprise-beans>
</ejb-jar>

and

<?xml version="1.0"?>

<jboss>
  <enterprise-beans>
    <message-driven>
      <ejb-name>AutobuildServiceBean</ejb-name>
      <configuration-name>Standard Message Driven Bean</configuration-name>
      <destination-jndi-name>queue/ServerQueue</destination-jndi-name>
    </message-driven>
  </enterprise-beans>
</jboss>

There will be, for example, 8 queues with 8 Jars (with an MDB each)
for 8 servers. The 8 here is just anb arbitrary figure. Each MDB will
contact it's server via SOAP, so the Java class has to know the name
of the server it has to contact, which I figure I can get from
interrogating the XML file.

What you say looks very interesting - I'd have to write out 2 sets of
XML per jar - which seems more of a job for Xdoclet, but I was
thinking that was too heavyweight for this problem? But it doesn't
seem insurmountable.

TIA

Roger.

On Thu, 1 Jul 2004 08:21:31 -0700 (PDT), Ivan Ivanov
<rambiusparkisanius@yahoo.com> wrote:
> 
> Roger, can you give some example of what you keep in
> your db and what you want to jar.
> My first idea is that you can use <sql> task to select
> the FQDNs that interest you and output the result set
> to a file:
> <sql
>     driver="org.database.jdbcDriver"
>     url="jdbc:database-url"
>     userid="sa"
>     password="pass"
>     output="FQDNs">
>   select FQDN from FQDNTABLE;
> </sql>
> and try for a way to iterate over the names in the
> files <foreach> task from ant-contrib maybe helpful
> here.
> 
> 
> --- roger day <rog3r.day@gmail.com> wrote:
> > I need to build multiple jars, each jar maps to a
> > member of a
> > collection of FQDNs kept in MySQL . I know I can use
> > SQL from within
> > ANT: can I use a list extracted from MySQL to form a
> > loop building
> > these jars?
> >
> > Or do I have to build a special task for this?
> >
> > Roger
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> >
> >
> 
> __________________________________
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.
> http://mobile.yahoo.com/maildemo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


-- 
http://www.badstep.net

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message