use of org.apache.openejb.jee.Empty in project tomee by apache.
the class JTAPuAndBmtTest method app.
@Module
public StatelessBean app() throws Exception {
final StatelessBean bean = new StatelessBean(BmtManager.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.jee.Empty in project tomee by apache.
the class ResourceLocalEmInjectionTest method app.
@Module
public StatelessBean app() throws Exception {
final StatelessBean bean = new StatelessBean(PersistManager.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.jee.Empty in project tomee by apache.
the class MethodPermission$JAXB method _write.
public static final void _write(final XoXMLStreamWriter writer, final MethodPermission methodPermission, RuntimeContext context) throws Exception {
if (methodPermission == null) {
writer.writeXsiNil();
return;
}
if (context == null) {
context = new RuntimeContext();
}
final String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
if (MethodPermission.class != methodPermission.getClass()) {
context.unexpectedSubclass(writer, methodPermission, MethodPermission.class);
return;
}
context.beforeMarshal(methodPermission, LifecycleCallback.NONE);
// ATTRIBUTE: id
final String idRaw = methodPermission.id;
if (idRaw != null) {
String id = null;
try {
id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
} catch (final Exception e) {
context.xmlAdapterError(methodPermission, "id", CollapsedStringAdapter.class, String.class, String.class, e);
}
writer.writeAttribute("", "", "id", id);
}
// ELEMENT: descriptions
Text[] descriptions = null;
try {
descriptions = methodPermission.getDescriptions();
} catch (final Exception e) {
context.getterError(methodPermission, "descriptions", MethodPermission.class, "getDescriptions", e);
}
if (descriptions != null) {
for (final Text descriptionsItem : descriptions) {
if (descriptionsItem != null) {
writer.writeStartElement(prefix, "description", "http://java.sun.com/xml/ns/javaee");
writeText(writer, descriptionsItem, context);
writer.writeEndElement();
} else {
context.unexpectedNullValue(methodPermission, "descriptions");
}
}
}
// ELEMENT: roleName
final List<String> roleNameRaw = methodPermission.roleName;
if (roleNameRaw != null) {
for (final String roleNameItem : roleNameRaw) {
String roleName = null;
try {
roleName = Adapters.collapsedStringAdapterAdapter.marshal(roleNameItem);
} catch (final Exception e) {
context.xmlAdapterError(methodPermission, "roleName", CollapsedStringAdapter.class, List.class, List.class, e);
}
if (roleName != null) {
writer.writeStartElement(prefix, "role-name", "http://java.sun.com/xml/ns/javaee");
writer.writeCharacters(roleName);
writer.writeEndElement();
} else {
context.unexpectedNullValue(methodPermission, "roleName");
}
}
}
// ELEMENT: unchecked
final Empty unchecked = methodPermission.unchecked;
if (unchecked != null) {
writer.writeStartElement(prefix, "unchecked", "http://java.sun.com/xml/ns/javaee");
writeEmpty(writer, unchecked, context);
writer.writeEndElement();
}
// ELEMENT: method
final List<Method> method = methodPermission.method;
if (method != null) {
for (final Method methodItem : method) {
if (methodItem != null) {
writer.writeStartElement(prefix, "method", "http://java.sun.com/xml/ns/javaee");
writeMethod(writer, methodItem, context);
writer.writeEndElement();
} else {
context.unexpectedNullValue(methodPermission, "method");
}
}
}
context.afterMarshal(methodPermission, LifecycleCallback.NONE);
}
use of org.apache.openejb.jee.Empty in project tomee by apache.
the class RsInterceptorInjectionTest method service.
@Module
public static SingletonBean service() throws Exception {
final SingletonBean bean = new SingletonBean(RsInjection.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.jee.Empty in project tomee by apache.
the class RsInjectionTest method service.
@Module
public static SingletonBean service() throws Exception {
final SingletonBean bean = new SingletonBean(RsInjection.class);
bean.setLocalBean(new Empty());
return bean;
}
Aggregations