Skip to content

Commit

Permalink
Update API to 20090625, mark all old methods still required by TCK as @…
Browse files Browse the repository at this point in the history
…deprecated, new methods in RI are throw new UnsupportedOperationException()

git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2895 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Jun 25, 2009
1 parent 4e07cd7 commit f28688f
Show file tree
Hide file tree
Showing 102 changed files with 1,039 additions and 498 deletions.
19 changes: 12 additions & 7 deletions api/pom.xml
@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -9,15 +10,19 @@

<groupId>org.jboss.webbeans</groupId>
<artifactId>jsr299-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>JSR-299 API</name>
<url>http://www.seamframework.org/WebBeans</url>

<dependencies>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb-api</artifactId>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion api/src/main/java/javax/decorator/Decorator.java
Expand Up @@ -24,7 +24,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.stereotype.Stereotype;

/**
* Specifies that a class is a decorator.
Expand Down
5 changes: 5 additions & 0 deletions api/src/main/java/javax/decorator/package-info.java
@@ -0,0 +1,5 @@
package javax.decorator;

/**
* The package javax.decorator contains annotations relating to decorators.
*/
@@ -0,0 +1,57 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.enterprise.context;

/**
* The container ensures that a long-running conversation may be associated with
* at most one request at a time, by blocking or rejecting concurrent requests.
* If the container rejects a request, it must associate the request with a new
* transient conversation and throw an exception of type
* {@link BusyConversationException} from the restore view phase of the JSF
* lifecycle.
*
*
* @author Pete Muir
*/

public class BusyConversationException extends ContextException
{

private static final long serialVersionUID = -3599813072560026919L;

public BusyConversationException()
{
super();
}

public BusyConversationException(String message)
{
super(message);
}

public BusyConversationException(Throwable cause)
{
super(cause);
}

public BusyConversationException(String message, Throwable cause)
{
super(message, cause);
}

}
53 changes: 53 additions & 0 deletions api/src/main/java/javax/enterprise/context/ContextException.java
@@ -0,0 +1,53 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.enterprise.context;


/**
* A ContextException is the base type for any context problem
*
* @author Pete Muir
* @author Shane Bryzak
*/

public class ContextException extends RuntimeException
{

private static final long serialVersionUID = -3599813072560026919L;

public ContextException()
{
super();
}

public ContextException(String message)
{
super(message);
}

public ContextException(Throwable cause)
{
super(cause);
}

public ContextException(String message, Throwable cause)
{
super(message, cause);
}

}
Expand Up @@ -19,17 +19,18 @@


/**
* A ContextNotActiveException is thrown if at a particular point in the
* execution of the program the scope is inactive with respect to the current
* thread. When the scope is inactive, any invocation of the get() from the
* A {@link ContextNotActiveException} is thrown if at a particular point in the
* execution of the program the context is inactive with respect to the current
* thread. When the context is inactive, any invocation of the get() from the
* current thread upon the Context object for that scope results in a
* ContextNotActiveException.
*
*
* @author Pete Muir
* @author Shane Bryzak
*/

public class ContextNotActiveException extends RuntimeException
public class ContextNotActiveException extends ContextException
{

private static final long serialVersionUID = -3599813072560026919L;
Expand Down
64 changes: 40 additions & 24 deletions api/src/main/java/javax/enterprise/context/Conversation.java
@@ -1,62 +1,72 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.
*/
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.enterprise.context;

/**
* Provides conversation management operations
*
* @author Pete Muir
*
*
*/
public interface Conversation
public interface Conversation
{

/**
* Mark a transient conversation long running. The container will generate an
* id
*
* @throws IllegalStateException if the current conversation is marked long
* running
*/
public void begin();

/**
* Mark a transient conversation long running.
*
* @param id the id of the conversation
* @throws IllegalStateException if the current conversation is marked long
* running
* @throws IllegalArgumentException if a long running conversation with id
* already exists
*/
public void begin(String id);

/**
* Mark a long running conversation transient
*
* @throws IllegalStateException if the current conversation is marked
* transient
*/
public void end();

/**
* Determine if a conversation is long running or transient
*
* @return true if the conversation is long running
*/
public boolean isLongRunning();

/**
* Get the id associated with the current long running conversation
*
* @return the id of the current long running conversation
*/
public String getId();

/**
* Get the timeout for the current long running conversation.
*
Expand All @@ -66,11 +76,17 @@ public interface Conversation
* @return the current timeout in milliseconds
*/
public long getTimeout();

/**
* Set the timeout for the current long running conversation
*
* @param milliseconds the new timeout in milliseconds
*/
public void setTimeout(long milliseconds);

/**
* @return true if the conversation is marked transient, or false if it is
* marked long-running.
*/
public boolean isTransient();
}
@@ -0,0 +1,57 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.enterprise.context;

/**
* If the propagated conversation cannot be restored, the container must
* associate the request with a new transient conversation and throw an
* exception of type {@link NonexistentConversationException} from the
* restore view phase of the JSF lifecycle. The application may handle this
* exception using the JSF ExceptionHandler.
*
*
*
* @author Pete Muir
*/

public class NonexistentConversationException extends ContextException
{

private static final long serialVersionUID = -3599813072560026919L;

public NonexistentConversationException()
{
super();
}

public NonexistentConversationException(String message)
{
super(message);
}

public NonexistentConversationException(Throwable cause)
{
super(cause);
}

public NonexistentConversationException(String message, Throwable cause)
{
super(message, cause);
}

}
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package javax.event;
package javax.enterprise.event;

import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Expand All @@ -31,6 +31,7 @@
*/
@Retention(RUNTIME)
@Target(PARAMETER)
@Deprecated
public @interface AfterTransactionCompletion
{
}
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package javax.event;
package javax.enterprise.event;

import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Expand All @@ -31,6 +31,7 @@
*/
@Retention(RUNTIME)
@Target(PARAMETER)
@Deprecated
public @interface AfterTransactionFailure
{
}

0 comments on commit f28688f

Please sign in to comment.