[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-20 Thread [EMAIL PROTECTED]
http://www.jboss.com/index.html?module=bbop=viewtopicp=4190794#4190794 - 
discussion on the EJB metadata discovery.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4190795#4190795

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4190795
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-18 Thread alesj
[EMAIL PROTECTED] wrote : 
  | * a list of all classes in classpath archives with web-beans.xml files
  | 
Let me see if I got this.

yes == includes web-beans.xml
no == doesn't include web-beans.xml

e.g.
- myapp.ear
-- lib
--- ext.jar // yes
--- util.jar // no
-- first.jar // yes
-- second.jar // no
-- users.war
--- WEB-INF
 web-beans.xml
 classes
-- org/acme/...
 lib
- ui1.jar // yes
- ui2.jar // no
-- crm.war
--- WEB-INF
 lib
-xyz.jar // yes

Classes from the following stuff should be returned:
 - ext.jar
 - first.jar
 - users.war/WEB-INF/classes
 - ui1.jar
 - xyz.jar

But not the rest, as they don't have proper web-beans.xml in metadata.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4190184#4190184

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4190184
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-18 Thread [EMAIL PROTECTED]
Looks right to me :-)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4190201#4190201

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4190201
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-17 Thread [EMAIL PROTECTED]
Here's the updated SPI based on Gavin's clarification and Adrian's suggestion:

/**
  |  * A container should implement this interface to allow the Web Beans RI to
  |  * discover the Web Beans to deploy
  |  * 
  |  * @author Pete Muir
  |  *
  |  */
  | public interface WebBeanDiscovery
  | {
  |/**
  | * @return A list of all classes in classpath archives with 
web-beans.xml files
  | */
  |public IterableClass? discoverWebBeanClasses();
  |
  |/**
  | * @return A list of all web-beans.xml files in the app classpath 
  | */
  |public IterableURL discoverWebBeansXml();
  |
  |/**
  | * @return A Map of EJB descriptors, keyed by the EJB bean class
  | */
  |public MapClass?, EjbDescriptor? discoverEjbs();
  |
  | }

public interface EjbDescriptorT
  | {
  |/**
  | * @return The EJB Bean class
  | */
  |public ClassT getType();
  | 
  |/**
  | * @return The JNDI name under which the EJB is registered
  | */
  |public String getJndiName();
  | 
  |/**
  | * @return The local interfaces of the EJB 
  | */
  |public IteratorClass? getLocalInterfaces();
  | 
  |/**
  | * @return The remove methods of the EJB
  | */
  |public IteratorMethod getRemoveMethods();
  |
  | }

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4189766#4189766

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4189766
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-17 Thread wolfc
[EMAIL PROTECTED] wrote :/**
  |   | * @return A Map of EJB descriptors, keyed by the EJB bean class
  |   | */
  |   |public MapClass?, EjbDescriptor? discoverEjbs();
A bean class can be used by multiple EJBs. So you'll have to come up with 
another key.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4189772#4189772

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4189772
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-17 Thread [EMAIL PROTECTED]
wolfc wrote : [EMAIL PROTECTED] wrote :/**
  |   |   | * @return A Map of EJB descriptors, keyed by the EJB bean class
  |   |   | */
  |   |   |public MapClass?, EjbDescriptor? discoverEjbs();
  | A bean class can be used by multiple EJBs. So you'll have to come up with 
another key.

Ok. We should probably be using ejb name anyway. AFAIK that is unique within an 
ejb archive, so we may need some combination of the two.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4189966#4189966

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4189966
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-14 Thread alesj
[EMAIL PROTECTED] wrote : 
  | The returned SetClass? should comprise all classes which present in 
this archive (and any sub-deployments it has e.g. in the war for an ear):
  | 
  | * any web-beans.xml file in any root directory of the application 
classpath, 
  | * any ejb-jar.xml file in any root directory of the application classpath 
that also has a web-beans.xml file, and 
  | * any Java class in any archive or directory in the classpath that has a 
web-beans.xml file in the root directory. 
Basically this is saying, give me all classes from classpath of a deployment 
which has web-beans.xml file in its metadata path?
I don't understand other two restrictions - ejb-jar.xml and Java class.

Note: I think web-beans.xml should be in META-INF (or WEB-INF), not in root

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4189394#4189394

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4189394
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-14 Thread [EMAIL PROTECTED]
I don't understand the second restriction great either. Gavin?

The third one I think is saying give me all the classes from any shared (lib/) 
jar that has web-beans.xml in it's metadata path. Gavin, is that right?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4189397#4189397

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4189397
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-14 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote : I don't understand the second restriction great 
either. Gavin?
  | 
  | The third one I think is saying give me all the classes from any shared 
(lib/) jar that has web-beans.xml in it's metadata path. Gavin, is that right?

He's talking about the spec defined behaviour 
(although it is not actually recommended that people use it)
see the JavaEE5 spec 8.3.1.3.d
anonymous wrote : 
  |  Another exception to this rule is JAR files located in the library
  | directory (usually named lib) in the application package. Note that the
  | presence of component-declaring annotations in shared artifacts, such as
  | libraries in the library directory and libraries referenced by more than one
  | module through Class-Path references, can have unintended and
  | undesirable consequences and is not recommended.
  | 

The reason its not recommend is because if you have for example
two ejb jars that reference the same helper jar via the manifest
they could both get processed for an ejb contained in the helper jar
which could in turn lead to the ejb constructed twice and then
not able to bind the remote interface to the same jndi name twice.
And other similar problems.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4189412#4189412

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4189412
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-14 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote : 
  | public interface WebBeanDiscovery {
  |   |
  |   |public SetClass? discoverWebBeanClasses();
  |   |
  |   | }
  | 

Isn't it more scalabe to use 
Iterableclass?
which could be a Set but also could be something more performant
if there are a very large number of classes.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4189414#4189414

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4189414
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: Web Bean Discovery

2008-11-14 Thread [EMAIL PROTECTED]
Pete, you slightly mangled the quote from the spec by removing it from context 
:-)

What its really saying is that the web bean manager needs to get given:

* a list of all web-beans.xml files in the app classpath
* a list of all classes in classpath archives with web-beans.xml files
* a list of all EJBs in the application, including their JNDI name and 
component type

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4189459#4189459

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4189459
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user