[weld-issues] [JBoss JIRA] Commented: (WELD-900) Docs: Improve Weld reference. Make it less poetic and more structured.

2011-05-26 Thread Ondrej Zizka (JIRA)

[ 
https://issues.jboss.org/browse/WELD-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604840#comment-12604840
 ] 

Ondrej Zizka commented on WELD-900:
---

{quote}
2.1.5. Interceptor binding types

You might be familiar with the use of interceptors in EJB 3.0. In Java EE 6, 
this functionality has been generalized to work with other managed beans. 
That's right, you no longer have to make your bean an EJB just to intercept its 
methods. Holler. So what does CDI have to offer above and beyond that? Well, 
quite a lot actually. Let's cover some background. 
{quote}

I don't think that assuming all readers are familiar with the use of 
interceptors.
The concept should be shortly explained, and maybe there can be a note that it 
originated in EJB 3.0.

Truth is, that it's covered that way in the chapter 9, but even in the 
introduction, I'd keep it that way.

> Docs: Improve Weld reference. Make it less poetic and more structured.
> --
>
> Key: WELD-900
> URL: https://issues.jboss.org/browse/WELD-900
> Project: Weld
>  Issue Type: Bug
>  Components: Documentation
>Reporter: Ondrej Zizka
>Assignee: Pete Muir
>
> It's nice to have a nice text for a DZone article, but for a reference 
> documentation, we should favor briefness and structure over potential 
> nomination for Man Booker International Prize :)
> What I mean is, e.g., if someone starts with Weld, he needs steps 1., 2., 3.
> IMO, this should be in **bold** in a special chapter called "Preparing 
> project to use Weld", with a sample code which is verified to work if copied 
> and run, and eventually a reference to a quick-start app:
> {quote}
> There's just little one thing you need to do before you can start injecting 
> them into stuff: you need to put them in an archive (a jar, or a Java EE 
> module such as a war or EJB jar) that contains a special marker file: 
> META-INF/beans.xml.
> {quote}
> In contrast, currently this most important information is buried at the end 
> of last paragraph of irrelevantly sounding chapter, "1.1. What is a bean?". 
> Why would anyone read "What is a bean"?
> my2p, ymmv

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues


[weld-issues] [JBoss JIRA] Commented: (WELD-900) Docs: Improve Weld reference. Make it less poetic and more structured.

2011-05-26 Thread Ondrej Zizka (JIRA)

[ 
https://issues.jboss.org/browse/WELD-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604831#comment-12604831
 ] 

Ondrej Zizka commented on WELD-900:
---

May I put some notes about what I meant? Not necessarily reopening the issue.

For instance, "1.2. Getting our feet wet".
1) Call me boring, but in reference manual, I'd expect "CDI Basics" or such.
2) 
{quote}
But wait! TextTranslator does not have a constructor with no parameters! Is it 
still a bean? If you remember, a class that does not have a constructor with no 
parameters can still be a bean if it has a constructor annotated @Inject.

As you've guessed, the @Inject annotation has something to do with dependency 
injection!
{quote}

As I wrote - such stile is fine for an article or a book.
But I'd expect a reference to be concisee. Sencences as "But wait", "Is it 
still a bean?", "If you remember", "As you've guessed" and such are just 
distracting. I'd rather welcome terse facts.

3)  Example 
{code}
@Named @RequestScoped \
public class TranslateController
{code}

If this is "Getting started" guide, then it should assume uninitiated reader.
 a) @Named should eitner not be present since it's not related to the matter 
being explained.
 b) @RequestScoped should explained shortly - 1 sentence with a link to list of 
related annotations.

I hope I explained what I meant by this jira.

> Docs: Improve Weld reference. Make it less poetic and more structured.
> --
>
> Key: WELD-900
> URL: https://issues.jboss.org/browse/WELD-900
> Project: Weld
>  Issue Type: Bug
>  Components: Documentation
>Reporter: Ondrej Zizka
>Assignee: Pete Muir
>
> It's nice to have a nice text for a DZone article, but for a reference 
> documentation, we should favor briefness and structure over potential 
> nomination for Man Booker International Prize :)
> What I mean is, e.g., if someone starts with Weld, he needs steps 1., 2., 3.
> IMO, this should be in **bold** in a special chapter called "Preparing 
> project to use Weld", with a sample code which is verified to work if copied 
> and run, and eventually a reference to a quick-start app:
> {quote}
> There's just little one thing you need to do before you can start injecting 
> them into stuff: you need to put them in an archive (a jar, or a Java EE 
> module such as a war or EJB jar) that contains a special marker file: 
> META-INF/beans.xml.
> {quote}
> In contrast, currently this most important information is buried at the end 
> of last paragraph of irrelevantly sounding chapter, "1.1. What is a bean?". 
> Why would anyone read "What is a bean"?
> my2p, ymmv

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues


[weld-issues] [JBoss JIRA] Commented: (WELD-914) WARN if beans.xml is missing in standalone mode.

2011-05-26 Thread Pete Muir (JIRA)

[ 
https://issues.jboss.org/browse/WELD-914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604642#comment-12604642
 ] 

Pete Muir commented on WELD-914:


Note that we know in SE that the user does want CDI enabled, so a missing 
beans.xml is obviously wrong!

> WARN if beans.xml is missing in standalone mode.
> 
>
> Key: WELD-914
> URL: https://issues.jboss.org/browse/WELD-914
> Project: Weld
>  Issue Type: Enhancement
>Reporter: Ondrej Zizka
> Attachments: CdiTry.zip
>
>
> STR:
> 1) Get the attached project, or,
>svn co http://ondrazizka.googlecode.com/svn/trunk/CdiTry -r 219
> 2) Remove beans.xml (if present)
> 3) Run org.jboss.qa.test.cditry.AppWeld
> You'll get an exception
> {code}
> 33 [main] INFO org.jboss.weld.Version - WELD-000900 1.1.1 (Final)
> 54 [main] INFO org.jboss.weld.Bootstrap - WELD-000101 Transactional services 
> not available. Injection of @Inject UserTransaction not available. 
> Transactional observers will be invoked synchronously.
> 273 [main] WARN org.jboss.interceptor.util.InterceptionTypeRegistry - Class 
> 'javax.ejb.PostActivate' not found, interception based on it is not enabled
> 273 [main] WARN org.jboss.interceptor.util.InterceptionTypeRegistry - Class 
> 'javax.ejb.PrePassivate' not found, interception based on it is not enabled
> Exception in thread "main" 
> org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308 Unable 
> to resolve any beans for Types: [class org.jboss.myapp.MyApp]; Bindings: 
> [@javax.enterprise.inject.Default()]
> at 
> org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:809)
> at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:108)
> at org.jboss.jawabot.JawaBotAppWeld.main(JawaBotAppWeld.java:17)
> {code}
> There should be a WARN if beans.xml is not found in standalone mode to make 
> it easier to figure it out.
> (I was tending to believe that there's something much more complex going on.)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


___
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues