Daniel, this example would be using Flyway or Liquibase, through the Maven
plugin in the pom.xml file, which would have the same functionality as the
ImportSql class.
You wouldn't have to change anything in the repository objects, as the
import would occur when executing Maven commands, during the build.

In other classes where the Import Sql class was used, i made changes by
commenting on the code snippet where the ImportSql class was called.
After i put the deprecated class comment in the ImportSql class, i had to
make changes to other classe, referring to the unit test of this class.

The changed classes, in addition to ImportSql, were the
following:Assembler, EntityManagerFactoryCallable and ImportSqlScriptTest.


Evaldo Junior


Em qui., 5 de set. de 2024 às 23:37, Daniel Dias Dos Santos <
daniel.dias.analist...@gmail.com> escreveu:

> I was thinking here. I think it would be interesting to have an example
> using flyway and liquibase in the TomEE repository.
>
> On Thu, Sep 5, 2024, 19:12 Evaldo Junior <evaldoapjun...@gmail.com> wrote:
>
> > Richard, thanks for your feedback.
> >
> >
> > Evaldo Junior
> >
> > Em qui., 5 de set. de 2024 às 06:18, Richard Zowalla <
> rich...@zowalla.com>
> > escreveu:
> >
> > > +1
> > >
> > > > Am 04.09.2024 um 05:49 schrieb Daniel Dias Dos Santos <
> > > daniel.dias.analist...@gmail.com>:
> > > >
> > > > Hello Evaldo,
> > > >
> > > > I agree with your suggestion.
> > > >
> > > >
> > > > On Wed, Sep 4, 2024, 00:43 Evaldo Junior <evaldoapjun...@gmail.com>
> > > wrote:
> > > >
> > > >> Richard, another alternative would be to place a deprecated
> annotation
> > > on
> > > >> the ImportSql class (item [1])  and add a comment in the class
> javadoc
> > > to
> > > >> use Flyway or Liquibase, instead of using the class itself.
> > > >>
> > > >>
> > > >> Evaldo Junior
> > > >>
> > > >>
> > > >> [1]
> > > >>
> > > >>
> > >
> >
> https://github.com/apache/tomee/blob/main/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ImportSql.java
> > > >>
> > > >>
> > > >> Em dom., 1 de set. de 2024 às 13:37, Evaldo Junior <
> > > >> evaldoapjun...@gmail.com>
> > > >> escreveu:
> > > >>
> > > >>>
> > > >>> Richard, i understand, and i've looked into it.
> > > >>>
> > > >>> Please, what should be done ? Would it be just a case of replacing
> > the
> > > >>> current import functionality, item [1], with Flyway or Liquibase,
> and
> > > >>> leaving it up to each developer to decide which of these tools to
> > use ?
> > > >>> Should a text file, such as Readme, be created, instructing
> > developers
> > > to
> > > >>> no longer use the import class, from item [1], and to use Flyway or
> > > >>> Liquibase ?
> > > >>> Or should one of these tools, Flyway or Liquibase, be chosen and a
> > > class
> > > >>> like this import class, item [1], be created as the official
> database
> > > >>> import class for the Tomee project ?
> > > >>>
> > > >>>
> > > >>> Evaldo Junior
> > > >>>
> > > >>>
> > > >>> [1]
> > > >>>
> > > >>
> > >
> >
> https://github.com/apache/tomee/blob/main/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ImportSql.java
> > > >>>
> > > >>>
> > > >>> Em ter., 13 de ago. de 2024 às 03:35, Evaldo Junior <
> > > >>> evaldoapjun...@gmail.com> escreveu:
> > > >>>
> > > >>>> Richard, thanks for you feedback.
> > > >>>>
> > > >>>>
> > > >>>> Evaldo Junior
> > > >>>>
> > > >>>>
> > > >>>> Em seg, 12 de ago de 2024 15:38, Richard Zowalla <r...@apache.org
> >
> > > >>>> escreveu:
> > > >>>>
> > > >>>>> Hi Evaldo,
> > > >>>>>
> > > >>>>> thanks for your mail.
> > > >>>>>
> > > >>>>> I am wondering, if this feature is still needed in 2024?
> > > >>>>>
> > > >>>>> Since 2014 tools such as liquibase or flyway have emerged and
> have
> > > >>>>> similar functionality interms of boot strapping a database.
> > > >>>>>
> > > >>>>> You can find an example for the current import feature in
> > > >>>>>
> > > >>>>> TomEE :: Examples :: DataSource Realm [1]
> > > >>>>>
> > > >>>>> The actual code is here: [2]
> > > >>>>>
> > > >>>>> Gruß
> > > >>>>> Richard
> > > >>>>>
> > > >>>>> [1] https://tomee.apache.org/latest/examples/realm-in-tomee.html
> > > >>>>> [2]
> > > >>>>>
> > > >>>>>
> > > >>
> > >
> >
> https://github.com/apache/tomee/blob/main/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ImportSql.java
> > > >>>>>
> > > >>>>>
> > > >>>>> Am Sonntag, dem 11.08.2024 um 11:01 -0300 schrieb Evaldo Junior:
> > > >>>>>> Romain, i have a question, about the ticket TOMEE-1380 -
> > > >>>>>> https://issues.apache.org/jira/projects/TOMEE/issues/TOMEE-1380
> .
> > > >>>>>> I am new to Tomee. I found the data directory, but I didn't
> > > >>>>>> understand how to import it.The data directory is in the Tomee
> > > >>>>>> Openejb module.
> > > >>>>>>
> > > >>>>>>
> > > >>>>>> image.png
> > > >>>>>>
> > > >>>>>> Please, where is the functionality that currently imports data
> > into
> > > >>>>>> the database ?
> > > >>>>>>
> > > >>>>>> Is there a visual feature in the manager, a screen, that already
> > > does
> > > >>>>>> this, only in text mode in SQL format, and now it will be done
> in
> > > >>>>>> JSON format ?
> > > >>>>>>
> > > >>>>>> Because I didn't find the feature that does this in SQL mode.
> > > >>>>>>
> > > >>>>>> Please, where is the current feature that imports files in SQL
> > > format
> > > >>>>>> ?
> > > >>>>>>
> > > >>>>>>
> > > >>>>>> Evaldo Junior
> > > >>>>>
> > > >>>>>
> > > >>
> > >
> > >
> >
>

Reply via email to