Richard, i understood, thank you very much for the explanations.

Evaldo Junior

Em sex., 6 de set. de 2024 às 14:36, Daniel Dias <d...@apache.org> escreveu:

> I understood, thank you very much for the explanations Richard
>
> On 2024/09/06 17:23:04 Richard Zowalla wrote:
> > Both can be used without TomEE at all. I would neither use a flag nor
> relate it to ImportSql (and it's Flags). I doubt that any one is actually
> using this feature today.
> >
> > If you would ask me, I would just close the issue as won't fix because
> alternatives are good and widley used today.
> >
> > Just think of a fully Independent example for a webapp with a database
> migration/import tool without modifying TomEE internal code at all, imho.
> >
> > Gruß
> > Richard
> >
> >
> > Am 6. September 2024 18:55:39 MESZ schrieb Daniel Dias <d...@apache.org>:
> > >I don't understand, to programmatically use flyway or liquibase would I
> have to modify something in Tomee internal code?
> > >
> > >On 2024/09/06 14:45:25 Evaldo Junior wrote:
> > >> Daniel, yes, i will do the example.
> > >>
> > >> Daniel, Richard, the ImportSql class is used in the class Assembler,
> which
> > >> is in the org.apache.openejb.assembler.classic package. Data is
> imported
> > >> according to a certain condition, using the hasSomethingToImport
> method. If
> > >> this import is being done in the Assembler class, in the
> doCreateResource
> > >> method, in the line 3.358, this import data must continue to exist.
> > >> So, if there is a certain condition, i will not be able to implement
> it via
> > >> the Maven plugin, as the execution of the plugin in the build does not
> > >> depend on the flag condition, it is direct.
> > >> So if i implement it to be executed in the build, this flag will not
> be
> > >> taken into account.
> > >> So in any case, even though this ImportSql class is deprecated and is
> no
> > >> longer used, i will have to implement it via code, programmatically,
> to
> > >> compensate for the unusability of the ImportSql class.
> > >> So i am going to choose one between the two, between Flyway and
> Liquibase,
> > >> and implement it. There is no point in just giving an example of how
> to use
> > >> Flyway and Liquibase, as it will have to be done, otherwise this
> import
> > >> condition, which is in the Assembler class, will be missing from the
> code.
> > >>
> > >>
> > >> Evaldo Junior
> > >>
> > >>
> > >>
> > >> Em sex., 6 de set. de 2024 às 11:37, Daniel Dias <d...@apache.org>
> escreveu:
> > >>
> > >> > Hello Evaldo,
> > >> >
> > >> > Thank you, it would help a lot to have an example like this :)
> > >> >
> > >> > On 2024/09/06 04:11:12 Evaldo Junior wrote:
> > >> > > Daniel, i have always used these tools via Maven, through
> plugins. I have
> > >> > > never used them programmatically. I will research, see how it is
> used
> > >> > > programmatically, and do the two examples.
> > >> > >
> > >> > >
> > >> > > Evaldo Junior
> > >> > >
> > >> > >
> > >> > >
> > >> > > Em sex., 6 de set. de 2024 às 01:02, Daniel Dias Dos Santos <
> > >> > > daniel.dias.analist...@gmail.com> escreveu:
> > >> > >
> > >> > > > Hello Evaldo,
> > >> > > >
> > >> > > > That's right, an example project using both via maven or
> programmatic
> > >> > (I
> > >> > > > don't remember how to do this) that would be in the "examples"
> folder.
> > >> > > >
> > >> > > > I think it would be cool for new people to join the project and
> see
> > >> > that it
> > >> > > > is possible to use this tool.
> > >> > > >
> > >> > > > On Fri, Sep 6, 2024, 00:52 Evaldo Junior <
> evaldoapjun...@gmail.com>
> > >> > wrote:
> > >> > > >
> > >> > > > > 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