+++ /dev/null
-/*\r
- * Copyright 2006 The Apache Software Foundation.\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-\r
-package javax.annotation;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER})\r
-@Retention(RetentionPolicy.RUNTIME)\r
-\r
-public @interface EJB {\r
- String name() default "";\r
- Class businessInterface() default java.lang.Object.class;\r
- String beanName() default "";\r
- String mappedName() default "";\r
- String description() default "";\r
-}\r
+++ /dev/null
-/*\r
- * Copyright 2006 The Apache Software Foundation.\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-\r
-package javax.annotation;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Target({ElementType.TYPE})\r
-@Retention(RetentionPolicy.RUNTIME)\r
-\r
-public @interface EJBs {\r
- EJB[] value();\r
-}\r
--- /dev/null
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package javax.annotation.security;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface DeclareRoles {
+ public String[] value();
+}
+++ /dev/null
-/*\r
- * Copyright 2006 The Apache Software Foundation.\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-\r
-package javax.annotation.security;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Target({ElementType.TYPE})\r
-@Retention(RetentionPolicy.RUNTIME)\r
-\r
-public @interface DeclaresRoles {\r
- public String[] value();\r
-}\r
--- /dev/null
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package javax.ejb;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface EJB {
+ String name() default "";
+ Class businessInterface() default java.lang.Object.class;
+ String beanName() default "";
+ String mappedName() default "";
+ String description() default "";
+}
--- /dev/null
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package javax.ejb;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface EJBs {
+ EJB[] value();
+}
\r
import javax.annotation.Resource;\r
import javax.annotation.Resources;\r
-import javax.annotation.security.DeclaresRoles;\r
+import javax.annotation.security.DeclareRoles;\r
import javax.annotation.security.RunAs;\r
\r
import org.apache.catalina.Container;\r
* Ref JSR 250, equivalent to the security-role element in\r
* the deployment descriptor\r
*/\r
- if (classClass.isAnnotationPresent(DeclaresRoles.class)) {\r
- DeclaresRoles annotation = (DeclaresRoles) \r
- classClass.getAnnotation(DeclaresRoles.class);\r
+ if (classClass.isAnnotationPresent(DeclareRoles.class)) {\r
+ DeclareRoles annotation = (DeclareRoles) \r
+ classClass.getAnnotation(DeclareRoles.class);\r
for (int i = 0; annotation.value() != null && i < annotation.value().length; i++) {\r
context.addSecurityRole(annotation.value()[i]);\r
}\r
import java.lang.reflect.Method;\r
import java.lang.reflect.Modifier;\r
\r
-import javax.annotation.EJB;\r
import javax.annotation.PostConstruct;\r
import javax.annotation.PreDestroy;\r
import javax.annotation.Resource;\r
+import javax.ejb.EJB;\r
import javax.naming.NamingException;\r
import javax.persistence.PersistenceContext;\r
import javax.persistence.PersistenceUnit;\r
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import javax.annotation.EJB;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
+import javax.ejb.EJB;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;