This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<---------------------------------------------------------------------------------------------------------------> | |
public interface Pages | |
{ | |
@View(extension = JSP) | |
class Index implements ViewConfig { } | |
@View(navigation = REDIRECT, viewParams = INCLUDE) | |
interface Admin extends ViewConfig | |
{ | |
interface Statistics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\glassfish3\jdk7\bin\java -ea -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\junit\lib\junit-rt.jar;C:\glassfish3\jdk7\jre\lib\charsets.jar;C:\glassfish3\jdk7\jre\lib\deploy.jar;C:\glassfish3\jdk7\jre\lib\javaws.jar;C:\glassfish3\jdk7\jre\lib\jce.jar;C:\glassfish3\jdk7\jre\lib\jsse.jar;C:\glassfish3\jdk7\jre\lib\management-agent.jar;C:\glassfish3\jdk7\jre\lib\plugin.jar;C:\glassfish3\jdk7\jre\lib\resources.jar;C:\glassfish3\jdk7\jre\lib\rt.jar;C:\glassfish3\jdk7\jre\lib\ext\dnsns.jar;C:\glassfish3\jdk7\jre\lib\ext\localedata.jar;C:\glassfish3\jdk7\jre\lib\ext\sunec.jar;C:\glassfish3\jdk7\jre\lib\ext\sunjce_provider.jar;C:\glassfish3\jdk7\jre\lib\ext\sunmscapi.jar;C:\glassfish3\jdk7\jre\lib\ext\zipfs.jar;C:\projects\ref\modules\admin\core\target\test-classes;C:\projects\ref\modules\admin\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(CdiTestRunner.class) //Or EJBContainerRunner does not matter | |
public class MyEETestWithDeltaSpike { | |
@PersistenceContext(unitName = "test") | |
private EntityManager em; | |
@Test | |
public void theTest() { | |
// do test | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package application.login; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.inject.Inject; | |
import org.apache.deltaspike.core.api.provider.BeanProvider; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public boolean isNew(Object entity) | |
{ | |
try | |
{ | |
return entityManager.getEntityManagerFactory().getPersistenceUnitUtil().getIdentifier(entity) == null; | |
} | |
catch (IllegalArgumentException e) | |
{ | |
// Not an entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\glassfish3\jdk7\bin\java -ea -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\junit\lib\junit-rt.jar;C:\glassfish3\jdk7\jre\lib\charsets.jar;C:\glassfish3\jdk7\jre\lib\deploy.jar;C:\glassfish3\jdk7\jre\lib\javaws.jar;C:\glassfish3\jdk7\jre\lib\jce.jar;C:\glassfish3\jdk7\jre\lib\jsse.jar;C:\glassfish3\jdk7\jre\lib\management-agent.jar;C:\glassfish3\jdk7\jre\lib\plugin.jar;C:\glassfish3\jdk7\jre\lib\resources.jar;C:\glassfish3\jdk7\jre\lib\rt.jar;C:\glassfish3\jdk7\jre\lib\ext\dnsns.jar;C:\glassfish3\jdk7\jre\lib\ext\localedata.jar;C:\glassfish3\jdk7\jre\lib\ext\sunec.jar;C:\glassfish3\jdk7\jre\lib\ext\sunjce_provider.jar;C:\glassfish3\jdk7\jre\lib\ext\sunmscapi.jar;C:\glassfish3\jdk7\jre\lib\ext\zipfs.jar;C:\vc\ref\core\impl\target\test-classes;C:\vc\ref\core\impl\target\classes;C:\vc\ref\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.os890.cdi; | |
import org.apache.deltaspike.data.api.mapping.SimpleQueryInOutMapperBase; | |
import org.os890.cdi.domain.Person; | |
import javax.inject.Inject; | |
import javax.persistence.EntityManager; | |
public class PersonMapper extends SimpleQueryInOutMapperBase<Person, PersonDTO> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.deltaspike.data.api.mapping.SimpleQueryInOutMapperBase; | |
import org.os890.cdi.domain.Person; | |
import javax.inject.Inject; | |
import javax.persistence.EntityManager; | |
public class PersonMapper extends SimpleQueryInOutMapperBase<Person, PersonDTO> { | |
@Override | |
protected PersonDTO toDto(final Person person) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" | |
version="3.1"> | |
<enterprise-beans> | |
<session> | |
<ejb-name>*</ejb-name> | |
<ejb-class>*</ejb-class> | |
<session-type>Singleton</session-type> | |
<concurrency-management-type>Bean</concurrency-management-type> |
OlderNewer