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 void sendReloadCacheEvent() { | |
event.fire(new ReloadTagsEvent()); | |
} | |
public List<Tag> getTagsAsList() { | |
return tagsAsList; | |
} | |
@PostConstruct | |
private void init() { |
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 void sendReloadCacheEvent() { | |
event.fire(new ReloadTagsEvent()); | |
} | |
public List<Tag> getTagsAsList() { | |
return tagsAsList; | |
} | |
@PostConstruct | |
private void init() { | |
getAllTags(); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/web/javax.faces.resource/theme.css.xhtml?ln=primefaces-bootstrap" /><title>JSF 2.2</title></head><body><form id="form" name="form" method="post" action="/web/index2.xhtml?windowId=af8" enctype="application/x-www-form-urlencoded"><input id="form:email" name="form:email" value="" placeholder="test%20test" type="email" /><input type="hidden" name="form_SUBMIT" value="1" /><input type="hidden" name="javax.faces.ViewState" id="j_id__v_0:javax.faces.ViewState:1" value="fExAanbc/rakmsmUIOA/KpMK6BjasG7Iox7v4ZXjaU7XuRCTwdQzXGYZc0rREu3akY74m7VgT3XC | |
Ijspgfka1+7E9bJmz8vcWIHsf9kpRHYMGqesvh/XBhy96aH6bdZC4vxfe4bEyMx4RY0ODrGzfUEP | |
dvmi/WOGe6DqtJIGDEsRt93JfgOyZldSVDaiLJ2RBaFOP/0Q/dwGkFwe2n8CDe+mq77eWznKF3lq | |
lVgPW2ai6vVzdttADCIHODUfMDvxLV18irrbCcfDolVBHVTTEGNQE1sh5JCebK/4Zkktfjxt8dwl | |
XtEv3EvbF+tWLum8lKz7smktgGE3T7+EwT4TCULO5ZTfe0y+9KBeTMYbbKd981dakqIbZDk+HJKn | |
rNz1lr5mY8o7uxrVeYyG9lxrnDRyZzJ6GAK6r |
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 List<Tag> completeTag(String query) { | |
List<Tag> suggestions = new ArrayList<>(); | |
for (Tag t : tagManager.getTags().values()) { | |
if (t.getName().toLowerCase().startsWith(query)) | |
suggestions.add(t); | |
} | |
Tag t = null; | |
if (suggestions.isEmpty() && query.endsWith(" ")) { | |
t = new Tag(); |
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 static DependentProvider<ContextControl> startContext(Class<? extends Annotation> scope) { | |
DependentProvider<ContextControl> dependentProvider = BeanProvider.getDependent(ContextControl.class); | |
ContextControl ctxCtrl = dependentProvider.get(); | |
ctxCtrl.startContext(scope); | |
return dependentProvider; | |
} |
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 void execute(JobExecutionContext context) throws JobExecutionException { | |
log.debug("{}, is executing", this.getClass().getSimpleName()); | |
try { | |
DependentProvider<ContextControl> ctx = CDIUtil.startContext(ApplicationScoped.class); | |
// do work | |
ctx.destroy(); | |
} catch (Exception e) { | |
// log properly | |
} |
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
@MessageDriven(activationConfig = { | |
@ActivationConfigProperty( | |
propertyName = "destinationType", | |
propertyValue = "javax.jms.Queue"), | |
@ActivationConfigProperty( | |
propertyName = "destination", | |
propertyValue = "queue") | |
}) | |
public class MsgDriven implements MessageListener { |
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 class MessageProducer { | |
@Resource | |
private ConnectionFactory connectionFactory; | |
@Resource(name = "queue") | |
private Queue answerQueue; | |
public void sendMessage(String text) throws JMSException { |
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:\Program Files\Java\jdk1.7.0_15\bin\java" -ea -Didea.launcher.port=7545 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.3\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.3\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_15\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\j |
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
@PreDestroy | |
private void cleanup() { | |
StringBuilder cookieValue = new StringBuilder(); | |
for (Entry<Integer, AtomicInteger> entry : locationCount.entrySet()) { | |
cookieValue.append(entry.getKey() + ":" + entry.getValue() + ","); | |
} | |
HttpServletResponse response = (HttpServletResponse) externalContext.getResponse(); | |
Cookie cookie = new Cookie(String.valueOf(session.getUsername().hashCode()), cookieValue.toString()); |
OlderNewer