You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Jacek Laskowski (JIRA)" <ji...@apache.org> on 2007/01/11 19:20:27 UTC
[jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to
other EJBs
[ https://issues.apache.org/jira/browse/OPENEJB-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463979 ]
Jacek Laskowski commented on OPENEJB-357:
-----------------------------------------
I'm against adding any semi-annotations to the code. It's not the code that should be changed to be shown in Wiki, but the macro itself should. These semi-annotations don't add any value to the code. We need to come up with another way to document the code than add // END snippet:.
-1
> Example: Using @EJB to refer to other EJBs
> ------------------------------------------
>
> Key: OPENEJB-357
> URL: https://issues.apache.org/jira/browse/OPENEJB-357
> Project: OpenEJB
> Issue Type: Sub-task
> Components: documentation, ejb3 simplified
> Affects Versions: 3.0
> Reporter: David Blevins
> Assigned To: Jeremy Whitlock
> Fix For: 3.0
>
> Attachments: OPENEJB-357.txt, patch.txt
>
>
> Shows how to use the @EJB annotation on a bean class to refer to other beans.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by David Blevins <da...@visi.com>.
On Jan 11, 2007, at 11:34 PM, Filippo Diotalevi wrote:
> On 1/12/07, David Blevins <da...@visi.com> wrote:
>>
>> Here's the snippet macro's source code if someone happened to have
>> time and/or ideas on how to make a version that did the same thing
>> without (or with less obnoxious) tags in source code.
>>
>> http://svn.atlassian.com/svn/public/contrib/confluence/snippet-
>> plugin/trunk/
>
> I'm not an expert in Confluence plugins, but I can try to give it a
> look and see if it's easy to modify for our needs.
I'm not sure what kind of tags might be better, maybe something
simply smaller might be less obnoxious. Or maybe something might
more sneakily look like an actual comment.
Maybe we could just configure the snippet delimiter at the top of the
class and then strategically use it in the document. Could even be
as short as a single character like '^' or '~'. No real need for a
text prefix with BEGIN and END as you could just parse on/off when
you see the delimiter and then reference the snippets by number.
Don't know what the snippet macro uses for parsing the files, but
with this library parsing with an arbitrary delimiter would be easy
as pie.
http://svn.codehaus.org/swizzle/trunk/swizzle-stream/src/main/java/
org/codehaus/swizzle/stream/StreamLexer.java
You just ...
String delimiter = ...;
StreamLexer lexer = new StreamLexer(delimiter, delimiter);
String firstSnippet = lexer.nextToken();
Or with the begin/end style...
String beginDelimiter = ...;
String endDelimiter = ...;
StreamLexer lexer = new StreamLexer(beginDelimiter, endDelimiter);
String firstSnippet = lexer.nextToken();
-David
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by Filippo Diotalevi <fi...@gmail.com>.
On 1/12/07, David Blevins <da...@visi.com> wrote:
>
> Here's the snippet macro's source code if someone happened to have
> time and/or ideas on how to make a version that did the same thing
> without (or with less obnoxious) tags in source code.
>
> http://svn.atlassian.com/svn/public/contrib/confluence/snippet-
> plugin/trunk/
I'm not an expert in Confluence plugins, but I can try to give it a
look and see if it's easy to modify for our needs.
--
filippo
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by David Blevins <da...@visi.com>.
On Jan 11, 2007, at 3:18 PM, Jacek Laskowski wrote:
> On 1/11/07, Jeremy Whitlock <jc...@gmail.com> wrote:
>> Hi All,
>> So before I just jump in and commit or not commit, can we come
>> to an
>> agreement. Do we want to commit these changes, if approved, or not?
>
> Dave + Dain are in favour of it while I'm -1. It's 2:1 for it. I'm
> sold!
To be clear, I hate the snippet comments in the source... I just
can't think of any better ideas.
Here's the snippet macro's source code if someone happened to have
time and/or ideas on how to make a version that did the same thing
without (or with less obnoxious) tags in source code.
http://svn.atlassian.com/svn/public/contrib/confluence/snippet-
plugin/trunk/
-David
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 1/11/07, Jeremy Whitlock <jc...@gmail.com> wrote:
> Hi All,
> So before I just jump in and commit or not commit, can we come to an
> agreement. Do we want to commit these changes, if approved, or not?
Dave + Dain are in favour of it while I'm -1. It's 2:1 for it. I'm sold!
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by David Blevins <da...@visi.com>.
On Jan 11, 2007, at 2:05 PM, Jeremy Whitlock wrote:
> Hi All,
> So before I just jump in and commit or not commit, can we come
> to an
> agreement. Do we want to commit these changes, if approved, or not?
I'm happy to back whatever solution Jacek likes.
-David
> Take care,
>
> Jeremy
>
> On 1/11/07, Dain Sundstrom <da...@iq80.com> wrote:
>>
>> On Jan 11, 2007, at 1:54 PM, David Blevins wrote:
>>
>> >
>> > On Jan 11, 2007, at 12:59 PM, Jacek Laskowski wrote:
>> >
>> >> On 1/11/07, Filippo Diotalevi <fi...@gmail.com> wrote:
>> >>
>> >>> Sorry about that. I followed the instructions for writing docs
>> >>> David gave here:
>> >>> http://www.nabble.com/Documenting-examples-%28was%3A-Re%3A-EJB3-
>> >>> Embedding-tutorial-avialable%29-p8084926.html
>> >>>
>> >>> I understand your point, having a less intrusive macro would be
>> >>> great.
>> >>> However, it's an example, and its goal is to be a demonstration
>> >>> of how
>> >>> ejb 3 work
>> >>
>> >> Well, let's pretend Dave was wrong that time and it was not a good
>> >> advice ;-)
>> >
>> > David never claimed to be right ;)
>> >
>> > "Any refinements/improvements welcome. If you end up tacking
>> > documenting an example, feel free to take a fresh (i.e. totally
>> > different) approach. Whatever get the job done :) Try and drop
>> some
>> > notes on the list if you do."
>> >
>> > I'm not a fan of the snippet tags in the code either, but my desire
>> > to see something on the website beat my dislike of the snippet
>> tags.
>>
>> I like the snippet tags since they remind me that I should make sure
>> the wiki text matches the code :)
>>
>> -dain
>>
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by Jeremy Whitlock <jc...@gmail.com>.
Hi All,
So before I just jump in and commit or not commit, can we come to an
agreement. Do we want to commit these changes, if approved, or not?
Take care,
Jeremy
On 1/11/07, Dain Sundstrom <da...@iq80.com> wrote:
>
> On Jan 11, 2007, at 1:54 PM, David Blevins wrote:
>
> >
> > On Jan 11, 2007, at 12:59 PM, Jacek Laskowski wrote:
> >
> >> On 1/11/07, Filippo Diotalevi <fi...@gmail.com> wrote:
> >>
> >>> Sorry about that. I followed the instructions for writing docs
> >>> David gave here:
> >>> http://www.nabble.com/Documenting-examples-%28was%3A-Re%3A-EJB3-
> >>> Embedding-tutorial-avialable%29-p8084926.html
> >>>
> >>> I understand your point, having a less intrusive macro would be
> >>> great.
> >>> However, it's an example, and its goal is to be a demonstration
> >>> of how
> >>> ejb 3 work
> >>
> >> Well, let's pretend Dave was wrong that time and it was not a good
> >> advice ;-)
> >
> > David never claimed to be right ;)
> >
> > "Any refinements/improvements welcome. If you end up tacking
> > documenting an example, feel free to take a fresh (i.e. totally
> > different) approach. Whatever get the job done :) Try and drop some
> > notes on the list if you do."
> >
> > I'm not a fan of the snippet tags in the code either, but my desire
> > to see something on the website beat my dislike of the snippet tags.
>
> I like the snippet tags since they remind me that I should make sure
> the wiki text matches the code :)
>
> -dain
>
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by Dain Sundstrom <da...@iq80.com>.
On Jan 11, 2007, at 1:54 PM, David Blevins wrote:
>
> On Jan 11, 2007, at 12:59 PM, Jacek Laskowski wrote:
>
>> On 1/11/07, Filippo Diotalevi <fi...@gmail.com> wrote:
>>
>>> Sorry about that. I followed the instructions for writing docs
>>> David gave here:
>>> http://www.nabble.com/Documenting-examples-%28was%3A-Re%3A-EJB3-
>>> Embedding-tutorial-avialable%29-p8084926.html
>>>
>>> I understand your point, having a less intrusive macro would be
>>> great.
>>> However, it's an example, and its goal is to be a demonstration
>>> of how
>>> ejb 3 work
>>
>> Well, let's pretend Dave was wrong that time and it was not a good
>> advice ;-)
>
> David never claimed to be right ;)
>
> "Any refinements/improvements welcome. If you end up tacking
> documenting an example, feel free to take a fresh (i.e. totally
> different) approach. Whatever get the job done :) Try and drop some
> notes on the list if you do."
>
> I'm not a fan of the snippet tags in the code either, but my desire
> to see something on the website beat my dislike of the snippet tags.
I like the snippet tags since they remind me that I should make sure
the wiki text matches the code :)
-dain
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by David Blevins <da...@visi.com>.
On Jan 11, 2007, at 12:59 PM, Jacek Laskowski wrote:
> On 1/11/07, Filippo Diotalevi <fi...@gmail.com> wrote:
>
>> Sorry about that. I followed the instructions for writing docs
>> David gave here:
>> http://www.nabble.com/Documenting-examples-%28was%3A-Re%3A-EJB3-
>> Embedding-tutorial-avialable%29-p8084926.html
>>
>> I understand your point, having a less intrusive macro would be
>> great.
>> However, it's an example, and its goal is to be a demonstration of
>> how
>> ejb 3 work
>
> Well, let's pretend Dave was wrong that time and it was not a good
> advice ;-)
David never claimed to be right ;)
"Any refinements/improvements welcome. If you end up tacking
documenting an example, feel free to take a fresh (i.e. totally
different) approach. Whatever get the job done :) Try and drop some
notes on the list if you do."
I'm not a fan of the snippet tags in the code either, but my desire
to see something on the website beat my dislike of the snippet tags.
The only options I see are to use the snippet macro or to just copy/
paste the code chunks into the wiki (and of course update the wiki
when/if the code changes).
I'm fine with either way... whatever it takes to get the job done
(i.e. getting these examples documented and on the website)
-David
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 1/11/07, Filippo Diotalevi <fi...@gmail.com> wrote:
> Sorry about that. I followed the instructions for writing docs David gave here:
> http://www.nabble.com/Documenting-examples-%28was%3A-Re%3A-EJB3-Embedding-tutorial-avialable%29-p8084926.html
>
> I understand your point, having a less intrusive macro would be great.
> However, it's an example, and its goal is to be a demonstration of how
> ejb 3 work
Well, let's pretend Dave was wrong that time and it was not a good advice ;-)
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by Filippo Diotalevi <fi...@gmail.com>.
> On 1/11/07, Jacek Laskowski (JIRA) <ji...@apache.org> wrote:
> > https://issues.apache.org/jira/browse/OPENEJB-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463979]
> >
> > Jacek Laskowski commented on OPENEJB-357:
> > -----------------------------------------
> > I'm against adding any semi-annotations to the code. It's not the code
> > that should be changed to be shown in Wiki, but the macro itself should.
> > These semi-annotations don't add any value to the code. We need to come up
> > with another way to document the code than add // END snippet:.
> > -1
Sorry about that. I followed the instructions for writing docs David gave here:
http://www.nabble.com/Documenting-examples-%28was%3A-Re%3A-EJB3-Embedding-tutorial-avialable%29-p8084926.html
I understand your point, having a less intrusive macro would be great.
However, it's an example, and its goal is to be a demonstration of how
ejb 3 work.
--
Filippo
Re: [jira] Commented: (OPENEJB-357) Example: Using @EJB to refer to other EJBs
Posted by Jeremy Whitlock <jc...@gmail.com>.
Jacek,
Good point. I've not looked at this to vote but I will later this
evening.
Take care,
Jeremy
On 1/11/07, Jacek Laskowski (JIRA) <ji...@apache.org> wrote:
>
>
> [
> https://issues.apache.org/jira/browse/OPENEJB-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463979]
>
> Jacek Laskowski commented on OPENEJB-357:
> -----------------------------------------
>
> I'm against adding any semi-annotations to the code. It's not the code
> that should be changed to be shown in Wiki, but the macro itself should.
> These semi-annotations don't add any value to the code. We need to come up
> with another way to document the code than add // END snippet:.
>
> -1
>
> > Example: Using @EJB to refer to other EJBs
> > ------------------------------------------
> >
> > Key: OPENEJB-357
> > URL: https://issues.apache.org/jira/browse/OPENEJB-357
> > Project: OpenEJB
> > Issue Type: Sub-task
> > Components: documentation, ejb3 simplified
> > Affects Versions: 3.0
> > Reporter: David Blevins
> > Assigned To: Jeremy Whitlock
> > Fix For: 3.0
> >
> > Attachments: OPENEJB-357.txt, patch.txt
> >
> >
> > Shows how to use the @EJB annotation on a bean class to refer to other
> beans.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> https://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>