RE: JPA Controller Generation

2020-02-16 Thread Kenneth Fogel
JIRA refused to accept my upload of a document that outlines my issues 
concerning the JPA generator. The file is available as a PDF or a Word docx. 
Both are refused with a message about a missing token. I do have a JIRA login. 
I will email it directly to you but I'd like to have it recorded on JIRA.

Ken


-Original Message-
From: Josh Juneau  
Sent: February 14, 2020 12:27 PM
To: dev 
Subject: Re: JPA Controller Generation

Thanks for reporting this issue Ken.  It would be good to get something in the 
issue tracker for this problem.  I haven't used the auto-generation of new JPA 
controllers.  I usually create my own so I haven't come across this issue...but 
I'll see if I can replicate this problem.  I may not personally be able to make 
the repairs for this (at least not anytime soon), but it should at least get in 
the tracker so that we can have it in the queue.  It does sound like this code 
needs updating.

It sounds like you have a good strategy for moving forward with your class.  
Hope all goes well.

Thanks

Josh Juneau
juneau...@gmail.com
http://jj-blogger.blogspot.com
https://www.apress.com/us/search?query=Juneau




On Fri, Feb 14, 2020 at 8:31 AM Kenneth Fogel 
wrote:

> I have calmed down and wish to apologize for the harshness of my 
> comments last night. I will download the latest source and review the 
> code that generates the controllers et all. I will suggest that there 
> should be two choices for JPA Controllers, one for stand alone and one 
> for application server managed.
>
> Ken
>
> 
> From: Kenneth Fogel 
> Sent: Friday, February 14, 2020 12:51:59 AM
> To: dev@netbeans.apache.org 
> Subject: JPA Controller Generation
>
> I have been using NetBeans, as many of you know, for years. In the 
> winter I teach an EE course that uses the JPA. In using the New -> JPA 
> Controllers from Entities I couldn’t believe what came out. Let’s review two 
> changes:
>
> If the persistence.xml file does not declare a connection (url, user, 
> pwd) the generated controllers are empty. When this file is used for 
> EE JPA you declare the connection in glassfish-resources.xml and not 
> the persistence.xml. Previous versions of NB did show the connection 
> details but if I edited for EE JPA and then generated the controllers 
> they were still generated. The controllers are generated from the 
> entities so why is the generator even looking at persistence.xml.
>
> Then there are the controllers themselves. They have been optimized 
> for stand alone, resource local usage. The optimizations, especially 
> the use of finally clauses to eliminate catch clauses makes no sense 
> to me. Many but not all exceptions simply result in an em.close(). 
> This is effectively the same as having an empty catch clause. Plus, 
> with an injected  EntityManager you should not be closing it, if I 
> understand how CDI works. There is no rollback anywhere. If the JPA 
> now rolls back automatically when an exception occurs I’ll withdraw this 
> complaint but I doubt it does.
>
> I could go on. If you want to see what controllers used to look like 
> and what had to be changed for EE look at my blog 
> https://www.omniprogrammer.com/?p=383.
>
> Is the JPA used more extensively on the desktop? I don’t think so. 
> Here I take the blame for not pointing out that there needs to be JPA 
> generation for Application Servers. If you look at my blog you can see 
> that the changes were minimal to the old generated code. Now the 
> changes will need to be more extensive.
>
> I have to stop now because I’m angry. Tomorrow morning I have to face 
> a class and before that I need to decide if I should tell them to cut 
> and paste code from my samples and change the names of objects or show 
> them all the changes needed to make the generated code work.
>
> Please tell me I have it all wrong and I’ll be happy to apologize for 
> this missive and never darken this mailing list again. I will also be 
> happy to contribute JPA/EE controller templates if my concerns are valid.
>
> Ken
>
>
>
>
>
>


Re: Re: "Using an IDE" Page outdated (Openjfx)

2020-02-16 Thread Sven Reimers
Do not worry... we all learn along the way...

;-)

Thanks for getting the thing started..

-Sven

P.S. I hope https://github.com/apache/netbeans-website/pull/450 will do the
trick

On Sun, Feb 16, 2020 at 3:39 PM Chuck Davis  wrote:

> I KNEW if I touched it I would blow up the whole thing.  I looked at the
> page to see it it had changed this a.m.  It changed alright but not for the
> better I fear.
>
> It seriously needs your attention (spell that "fix") again, Geertjan!  Or
> somebody else who knows what they're doing.  I don't see the difference
> between my link and those that follow.
>
> On Sat, Feb 15, 2020 at 2:50 PM Geertjan Wielenga 
> wrote:
>
> > Can you point to the page where you would like the YouTube clip to be
> > listed?
> >
> > As you do that, notice the link at the bottom of the page for getting to
> > the source of the page. Then edit the page online and prove your PR.
> >
> >
> >
> >
>


-- 
Sven Reimers

* Java Champion
* Apache NetBeans PMC: http://netbeans.apache.org
* JUG Leader JUG Bodensee: https://www.meetup.com/JUG-Bodensee
* Duke's Choice Award Winner 2009 & 2018

* LinkedIn: http://www.linkedin.com/in/svenreimers


Re: Re: "Using an IDE" Page outdated (Openjfx)

2020-02-16 Thread Chuck Davis
I KNEW if I touched it I would blow up the whole thing.  I looked at the
page to see it it had changed this a.m.  It changed alright but not for the
better I fear.

It seriously needs your attention (spell that "fix") again, Geertjan!  Or
somebody else who knows what they're doing.  I don't see the difference
between my link and those that follow.

On Sat, Feb 15, 2020 at 2:50 PM Geertjan Wielenga 
wrote:

> Can you point to the page where you would like the YouTube clip to be
> listed?
>
> As you do that, notice the link at the bottom of the page for getting to
> the source of the page. Then edit the page online and prove your PR.
>
>
>
>


Re: Re: "Using an IDE" Page outdated (Openjfx)

2020-02-16 Thread Sven Reimers
Thanks for starting this...

I added some more updates to the JavaFX section...

Thanks again

-Sven

On Sun, Feb 16, 2020 at 12:28 AM Chuck Davis  wrote:

> Discovered I opened an account several years ago I forgot all about.  Think
> I edited the page then pushed the big green button a couple times.
>
> Let me know if I have to do something else.That video will help a
> number of people I'm sure.
>
> On Sat, Feb 15, 2020 at 2:50 PM Geertjan Wielenga 
> wrote:
>
> > Can you point to the page where you would like the YouTube clip to be
> > listed?
> >
> > As you do that, notice the link at the bottom of the page for getting to
> > the source of the page. Then edit the page online and prove your PR.
> >
> > Gj
> >
> > On Sat, 15 Feb 2020 at 23:43, Chuck Davis  wrote:
> >
> > > I have NO idea how to do that!!  I'd probably crash the whole system
> > trying
> > > something like that!
> > >
> > > On Sat, Feb 15, 2020 at 2:40 PM Geertjan Wielenga  >
> > > wrote:
> > >
> > > > Great idea. Everything is on GitHub, just provide a PR on the page
> > where
> > > > you think it fits best and I’ll merge it.
> > > >
> > > > Gj
> > > >
> > > > On Sat, 15 Feb 2020 at 23:37, Chuck Davis 
> wrote:
> > > >
> > > > > Geertjan, why not put a link to that on the netbeans page as a JFX
> > > > > tutorial?  That would save a number of people a lot of time
> searching
> > > for
> > > > > help.
> > > > >
> > > > > On Sat, Feb 15, 2020 at 1:47 PM Geertjan Wielenga <
> > geert...@apache.org
> > > >
> > > > > wrote:
> > > > >
> > > > > > https://m.youtube.com/watch?v=8xaRwqcKPSI
> > > > > >
> > > > > > Gj
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Sat, 15 Feb 2020 at 22:43, Neil C Smith <
> neilcsm...@apache.org>
> > > > > wrote:
> > > > > >
> > > > > > > On Sat, 15 Feb 2020 at 21:27, Chuck Davis 
> > > > wrote:
> > > > > > > > Neil, can you provide a link or a description how to get to
> the
> > > #3
> > > > > you
> > > > > > > > mention?  I think you're referencing some resource about
> which
> > > I'm
> > > > > > > ignorant
> > > > > > > > at the moment.  Thanks.
> > > > > > >
> > > > > > > Not really, it's on the link you shared -
> > > > > > > https://openjfx.io/openjfx-docs/#IDE-NetBeans
> > > > > > >
> > > > > > > Point - 3. Run the project - under both Maven sections.
> > > > > > >
> > > > > > > Best wishes,
> > > > > > >
> > > > > > > Neil
> > > > > > >
> > > > > > >
> > > -
> > > > > > > To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> > > > > > > For additional commands, e-mail: dev-h...@netbeans.apache.org
> > > > > > >
> > > > > > > For further information about the NetBeans mailing lists,
> visit:
> > > > > > >
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


-- 
Sven Reimers

* Java Champion
* Apache NetBeans PMC: http://netbeans.apache.org
* JUG Leader JUG Bodensee: https://www.meetup.com/JUG-Bodensee
* Duke's Choice Award Winner 2009 & 2018

* LinkedIn: http://www.linkedin.com/in/svenreimers