Source Code Cross Referenced for EJBControl.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » controls » system » ejb » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache beehive 1.0.2 src » org.apache.beehive.controls.system.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         *
017:         * $Header:$
018:         */
019:        package org.apache.beehive.controls.system.ejb;
020:
021:        import java.lang.annotation.ElementType;
022:        import java.lang.annotation.Retention;
023:        import java.lang.annotation.RetentionPolicy;
024:        import java.lang.annotation.Target;
025:
026:        import org.apache.beehive.controls.api.bean.AnnotationMemberTypes;
027:        import org.apache.beehive.controls.api.bean.ControlInterface;
028:        import org.apache.beehive.controls.api.bean.AnnotationConstraints.MembershipRule;
029:        import org.apache.beehive.controls.api.bean.AnnotationConstraints.MembershipRuleValues;
030:        import org.apache.beehive.controls.api.properties.PropertySet;
031:
032:        /**
033:         * Enterprise Java Bean Control base interface
034:         */
035:        @ControlInterface(defaultBinding="org.apache.beehive.controls.system.ejb.EJBControlImpl")
036:        public interface EJBControl {
037:            /**
038:             * EJBHome specifies the target EJB's home interface for the EJB control using the following attributes:
039:             * <ul>
040:             * <li><b>jndiName</b> specifies the JNDI name of the target EJB's home interface
041:             *   (e.g. EJBNameHome).  This value may also be an URL using the "JNDI:" 
042:             *   protocol (e.g. jndi://username:password@host:port/EJBNameHome).
043:             * </li>
044:             * <li><b>ejbLink</b> specifies the name of the target EJB using the application
045:             *   relative path to the EJB JAR.  This syntax causes the runtime to
046:             *   use an application scoped name when locating the referenced EJB.  
047:             *   The naming syntax is jarfile.jar#ejb-name (e.g. ejbModule.jar#HelloBean).
048:             * </li>
049:             * </ul>
050:             * An EJB Control in a web application would reference an EJB type using the
051:             * fully qualified name of the control interface with the suffix "jcx".  For example,
052:             * a control of type <code>controls.HelloEjbControl</code> would resolve the EJB using
053:             * the following entry in web.xml:
054:             * <pre>
055:             * &lt;ejb-ref>
056:             *     &lt;ejb-ref-name>controls.HelloEjbControl.jcx&lt;/ejb-ref-name>
057:             *     &lt;ejb-ref-type>Session&lt;/ejb-ref-type>
058:             *     &lt;home>ejbs.HelloBeanHome&lt;/home>
059:             *     &lt;remote>ejbs.HelloBeanRemote&lt;/remote>
060:             *     &lt;ejb-link>ejbModule.jar#HelloBean&lt;/ejb-link>
061:             * &lt;/ejb-ref>
062:             * </pre>
063:             */
064:            @PropertySet
065:            @Retention(RetentionPolicy.RUNTIME)
066:            @Target({ElementType.TYPE,ElementType.FIELD})
067:            // allow override on declaration
068:            @MembershipRule(MembershipRuleValues.EXACTLY_ONE)
069:            public @interface EJBHome {
070:                String jndiName() default "";
071:
072:                String ejbLink() default "";
073:            }
074:
075:            /**
076:             * JNDIContextEnv specifies the environment properties for the JNDI context that will
077:             * be used to lookup the target EJB.  This attribute is optional.  If you are using 
078:             * an URL with the "JNDI:" protocol or if you want to use a JNDI context with the 
079:             * default envirnoment properties, you do not need a specify any values for this attribute. 
080:             */
081:            @PropertySet
082:            @Retention(RetentionPolicy.RUNTIME)
083:            @Target({ElementType.TYPE,ElementType.FIELD})
084:            // allow override on declaration
085:            public @interface JNDIContextEnv {
086:                @AnnotationMemberTypes.Optional
087:                String contextFactory() default "";
088:
089:                @AnnotationMemberTypes.Optional
090:                String providerURL() default "";
091:
092:                @AnnotationMemberTypes.Optional
093:                String principal() default "";
094:
095:                @AnnotationMemberTypes.Optional
096:                String credentials() default "";
097:            }
098:
099:            /**
100:             * Returns an instance of the home interface associated with
101:             * the target bean component.
102:             */
103:            public Object getEJBHomeInstance();
104:
105:            /**
106:             * Returns true if the EJB control currently has a target bean instance
107:             * upon which bean business interface methods may be invoked.  This will
108:             * be true after a successful create() or single select finder method
109:             * execution, or in cases where implicit creation or find has occurred
110:             * by the control on the control users behalf.  This provides a simple
111:             * way to procedurally check the status of explicit or implicit
112:             * bean instance creation or find operations.
113:             */
114:            public boolean hasEJBBeanInstance();
115:
116:            /**
117:             * Returns the current target instance of the bean business interface
118:             * used for business interface method invocations.  This API is
119:             * provided for advanced use cases were direct access to the local/
120:             * remote interfaces outside of the control is required.  It will
121:             * return <code>null</code> if no target instance is currently
122:             * selected.
123:             */
124:            public Object getEJBBeanInstance();
125:
126:            /**
127:             * Returns the last EJB exception serviced by the EJB control on the
128:             * developers behalf.  This can be used to discover or log additional
129:             * information, for example when a create or find method is unable to
130:             * locate a target bean instance.
131:             */
132:            public Throwable getEJBException();
133:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.