<html><body bgcolor="#FFFFFF"><div>Why would you want to require a running and fully confugured Appserver for doing reverse engineering ?</div><div><br></div><div>Sounds like a very overengineered approach ?</div><div><br></div><div>And what if your code is not compilable ?&nbsp;<br><br>/max (sent from my phone)<div><br></div></div><div><br>On 16/04/2011, at 16.24, "Lincoln Baxter, III" &lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>In theory, it should be possible to gain access to the AppServer JNDI connections by:<br><br><ul><li>Use Forge itself to inspect persistence.xml</li><li>If it detects JNDI connection settings, generate an EE webapp with the persistence.xml and hibernate-tools embedded inside. <br>
</li><li>Deploy the webapp, which then generates the entities for the project.</li><li>Undeploy and destroy the temp project.</li></ul>Paul Bakker is using a similar technique to generate deployments using Arquillian:<br>
<br><a href="https://issues.jboss.org/browse/SEAMFORGE-109"><a href="https://issues.jboss.org/browse/SEAMFORGE-109">https://issues.jboss.org/browse/SEAMFORGE-109</a></a><br><br>~Lincoln<br><br><div class="gmail_quote">On Sat, Apr 16, 2011 at 2:48 AM, Max Rydahl Andersen <span dir="ltr">&lt;<a href="mailto:max.andersen@redhat.com"><a href="mailto:max.andersen@redhat.com">max.andersen@redhat.com</a></a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The persistence.xml just needs to be on the classpath at META-INF/persistence.xml as defined by the spec.<br>

(assuming you use jpaconfiguration)<br>
<br>
But how often will a persistence.xml actually have the database connection info ?<br>
<br>
if it is the persistence.xml used for deploying then it will contain the datasource name and<br>
nothing else aka. not enough info for hibernate tools nor hibernate it self to connect "outside" the server.<br>
<br>
This is why in hibernate tools (both ant and eclipse version) we allow you to specify a properties file<br>
to use that will override anything found in persistence.xml on the classpath/default hibernate configuration semantics.<br>
<br>
Until Forge it self gets a notion of database connection info I would suggest using this separate properties file<br>
for development connection info would be the simplest/easiest approach ? (we even have a "standard" name for<br>
it with default content to get the best non-invasive behavior)<br>
<br>
here is what seam 2 projects made by seamgen and/or jboss tools looks like:<br>
#File used by hibernate tools to override &lt;datasource&gt; and other container specific settings in persistence.xml<br>
hibernate.connection.password=<br>
hibernate.connection.username=sa<br>
hibernate.connection.driver_class=org.hsqldb.jdbcDriver<br>
hibernate.dialect=org.hibernate.dialect.HSQLDialect<br>
hibernate.connection.url=jdbc:hsqldb:.<br>
<br>
hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider<br>
hibernate.datasource=<br>
hibernate.transaction.manager_lookup_class=<br>
<br>
The default (bad?) name is hibernate-console.properties.<br>
<br>
Notice, the last three elements would probably be better off being defaulted in forge plugin to ensure<br>
hibernate won't start doing any of its JEE integration code just because you have a peristence.xml with<br>
datasource and jta tx info in it.<br>
<br>
/max<br>
<div><div></div><div class="h5"><br>
On Apr 15, 2011, at 18:55, brian wrote:<br>
<br>
<br>
<br>
&gt;<br>
&gt; hi L3 and john.<br>
&gt;<br>
&gt; I was thinking about the persistence.xml. &nbsp;Would using piping make sense<br>
&gt; to read/parse the fields from the persistence.xml and then pass them to<br>
&gt; GenerateEntities?<br>
&gt;<br>
&gt; so "read-persistence | generate-entities" ?<br>
&gt;<br>
&gt; ...I'm not sure if a plugin can read a file, but if it could, a little<br>
&gt; file-reader/parser might work?<br>
&gt;<br>
&gt;<br>
&gt; On Fri, 2011-04-15 at 12:04 -0400, Lincoln Baxter, III wrote:<br>
&gt;&gt; Hi John!<br>
&gt;&gt;<br>
&gt;&gt; Thank you for your interest! I think it's fair to say that we are<br>
&gt;&gt; "close" to having a fully-functional database reverse-engineering<br>
&gt;&gt; plugin, but we are not there yet. Brian (ccd) has been doing some work<br>
&gt;&gt; recently (when he has time) to get Max Andersen's prototype up and<br>
&gt;&gt; running. The prototype is here, but has a few shortcomings:<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://github.com/forge/plugin-hibernate-tools" target="_blank"><a href="https://github.com/forge/plugin-hibernate-tools">https://github.com/forge/plugin-hibernate-tools</a></a><br>
&gt;&gt; &nbsp; &nbsp; 1. Connection settings are hardcoded<br>
&gt;&gt; &nbsp; &nbsp; 2. JDBC drivers are not included with the plugin<br>
&gt;&gt; &nbsp; &nbsp; 3. Does not take persistence.xml into account, if it exists<br>
&gt;&gt; In short, it works, but is not usable yet; however, these are all<br>
&gt;&gt; things that can be worked on if you are interested! And I would be<br>
&gt;&gt; more than happy to help you get together with Brian and get two brains<br>
&gt;&gt; working on this! Would you be intersted in that?<br>
&gt;&gt;<br>
&gt;&gt; No matter your level of commitment, I would recommend joining the dev<br>
&gt;&gt; and users lists:<br>
&gt;&gt; &nbsp; &nbsp; &nbsp;* <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/forge-dev">https://lists.jboss.org/mailman/listinfo/forge-dev</a></a><br>
&gt;&gt; &nbsp; &nbsp; &nbsp;* <a href="https://lists.jboss.org/mailman/listinfo/forge-users" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/forge-users">https://lists.jboss.org/mailman/listinfo/forge-users</a></a><br>
&gt;&gt; Just let me know and I'll get you all the info that you'll need :)<br>
&gt;&gt; ~Lincoln<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Mar 17, 2011 at 8:57 PM, John du Clos &lt;<a href="mailto:duclosjj@yahoo.com"><a href="mailto:duclosjj@yahoo.com">duclosjj@yahoo.com</a></a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;Hi Lincoln-<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;I was chatting with Dan Allen and he mentioned you are working<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;on Forge and specifically the reverse engineering feature from<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;the database. &nbsp;I wanted to reach out to you to see if you have<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;any early versions you need testers to help you verify this<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;feature.<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;I look forward to hearing from you!<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;John<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;--- On Wed, 3/16/11, Dan Allen &lt;<a href="mailto:dan.j.allen@gmail.com"><a href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a></a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;From: Dan Allen &lt;<a href="mailto:dan.j.allen@gmail.com"><a href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a></a>&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Subject: Re: <a href="http://Mojavelinux.com">Mojavelinux.com</a> Feedback: seam-gen and<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cdi/weld<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;To: <a href="mailto:duclosjj@yahoo.com"><a href="mailto:duclosjj@yahoo.com">duclosjj@yahoo.com</a></a><br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Date: Wednesday, March 16, 2011, 9:33 PM<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hey John,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Thanks for reading the book. I'm glad it helped you<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;along. I know about those painful days of J2EE you are<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;talking about.<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;The best way to get started atm is using the Maven<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;archetype.<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://tinyurl.com/gojavaee" target="_blank"><a href="http://tinyurl.com/gojavaee">http://tinyurl.com/gojavaee</a></a><br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;That gives you a starter project. We don't yet have<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;the reverse engineering yet for this environment. That<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;what Forge will offer soon. Check out the issue<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tracker or mailing list for updates.<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hope that gets you started. Cheers,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- Dan Allen<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sent from my Android-powered phone:<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;An open platform for carriers, consumers and<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;developers<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;On Mar 16, 2011 9:04 PM, &lt;<a href="mailto:duclosjj@yahoo.com"><a href="mailto:duclosjj@yahoo.com">duclosjj@yahoo.com</a></a>&gt; wrote:<br>
&gt;&gt;&gt; Submitted by: John duClos &lt;<a href="mailto:duclosjj@yahoo.com"><a href="mailto:duclosjj@yahoo.com">duclosjj@yahoo.com</a></a>&gt; on<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Wednesday, March 16th, 2011 @ 9:04:25 pm (-0400)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Online Form Fields<br>
&gt;&gt;&gt; ------------------<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Url:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Message:<br>
&gt;&gt;&gt; Dan-<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I purchased your Seam book when it was published and<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;am a supporter of<br>
&gt;&gt;&gt; the Seam framework since I lived the challenging<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;days of early J2EE<br>
&gt;&gt;&gt; development.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I work with database centric solutions and seam-gen<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;allowed me to<br>
&gt;&gt;&gt; develop solutions in record time by getting my<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;project started very<br>
&gt;&gt;&gt; quickly. I'd like to start implementing JEE 6/CDI<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;with JBoss AS 6, but<br>
&gt;&gt;&gt; I can't seem to find a way to issue the seam-gen<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;command.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I looked at Forge but that is not where seam-gem<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;was. Do you know of a<br>
&gt;&gt;&gt; valid seam-gen solution for JEE 6/CDI based projects<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(Seam 3).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks,<br>
&gt;&gt;&gt; John<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Client Variables<br>
&gt;&gt;&gt; ----------------<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; HTTP_USER_AGENT:<br>
&gt;&gt;&gt; Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3.5.21022; .NET CLR 3.5.30729; MDDS; .NET CLR<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3.0.30729; MS-RTC LM 8; AskTB5.4)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Lincoln Baxter, III<br>
&gt;&gt; <a href="http://ocpsoft.com" target="_blank"><a href="http://ocpsoft.com">http://ocpsoft.com</a></a><br>
&gt;&gt; <a href="http://scrumshark.com" target="_blank"><a href="http://scrumshark.com">http://scrumshark.com</a></a><br>
&gt;&gt; "Keep it Simple"<br>
&gt;<br>
&gt;<br>
</div></div><div class="im">&gt; _______________________________________________<br>
&gt; forge-dev mailing list<br>
&gt; <a href="mailto:forge-dev@lists.jboss.org"><a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a></a><br>
</div><div class="im">&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/forge-dev">https://lists.jboss.org/mailman/listinfo/forge-dev</a></a><br>
<br>
</div>/max<br>
<a href="http://about.me/maxandersen" target="_blank"><a href="http://about.me/maxandersen">http://about.me/maxandersen</a></a><br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com"><a href="http://ocpsoft.com">http://ocpsoft.com</a></a><br><a href="http://scrumshark.com"><a href="http://scrumshark.com">http://scrumshark.com</a></a><br>"Keep it Simple"<br>
</div></blockquote></body></html>