jakarta-ee

javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted

不羁的心 提交于 2021-02-08 07:57:43
问题 Mail service configuration in standalone-full-ha.xml . <subsystem xmlns="urn:jboss:domain:mail:2.0"> <mail-session name="default" jndi-name="java:jboss/mail/Default" from="sender@gmail.com"> <smtp-server outbound-socket-binding-ref="mail-smtp" ssl="true" username="User" password="password"/> </mail-session> </subsystem> The mail Session in turn references an SMTP host bound at localhost at port 465. <outbound-socket-binding name="mail-smtp"> <remote-destination host="smtp.gmail.com" port="465

javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted

穿精又带淫゛_ 提交于 2021-02-08 07:57:25
问题 Mail service configuration in standalone-full-ha.xml . <subsystem xmlns="urn:jboss:domain:mail:2.0"> <mail-session name="default" jndi-name="java:jboss/mail/Default" from="sender@gmail.com"> <smtp-server outbound-socket-binding-ref="mail-smtp" ssl="true" username="User" password="password"/> </mail-session> </subsystem> The mail Session in turn references an SMTP host bound at localhost at port 465. <outbound-socket-binding name="mail-smtp"> <remote-destination host="smtp.gmail.com" port="465

Wildfly - set datasource password at runtime

我怕爱的太早我们不能终老 提交于 2021-02-08 03:45:57
问题 I am developing a server application using Jboss wildfly 8.1 and JPA Hibernate. The problem is, that the JPA datasource creditials have to be loaded at runtime (password). When the server starts, it connects to an encrypted storage where it retrieves password to real database. After that, it should establish connection to the real database. I tried several things already: Lookup the datasource through JNDI and rebind it with actual DS. Lookup the entityManagerFactory through JNDI and rebind

log4j.xml Rolling Appender based on size

六月ゝ 毕业季﹏ 提交于 2021-02-08 03:37:08
问题 Please find below my log4.xml configuration for rolling file appender <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="instrumentationAppender" class="org.apache.log4j.RollingFileAppender"> <param name="file" value="C:\\Users\\Test\\Downloads\\Testlogs\\instrumentation.log"/> <param name="Append" value="true" /> <param name="Encoding" value="UTF-8" /> <param name=

log4j.xml Rolling Appender based on size

房东的猫 提交于 2021-02-08 03:36:25
问题 Please find below my log4.xml configuration for rolling file appender <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="instrumentationAppender" class="org.apache.log4j.RollingFileAppender"> <param name="file" value="C:\\Users\\Test\\Downloads\\Testlogs\\instrumentation.log"/> <param name="Append" value="true" /> <param name="Encoding" value="UTF-8" /> <param name=

calling non static method from static class in java with spring autowiring?

ⅰ亾dé卋堺 提交于 2021-02-07 21:52:17
问题 I have below interface and its implementation class. Demo.java public interface Demo{ void showDemo(); } DemoImpl.java @Service public class DemoImpl implements Demo{ public void showDemo(){ //To Do } } Now i have one class with static method which will internally call showDemo() as below. DemoStatic.java @Component public class DemoStatic{ @Autowired private Demo demo; public static void callShowDemo(){ demo.showDemo(); //calling non static method from static method } } Here i am calling non

Hibernate criteria accepting %% value

十年热恋 提交于 2021-02-07 20:48:40
问题 I am using the below Hibernate code to filter workFlowName . crt.add(Restrictions.like("workFlowName", workFlow, MatchMode.ANYWHERE)); // crt is the criteria The problem is when I pass the value to workFlow from web (TextBox).it fetching the value correctly (I am passing sym in text box if fetch 10 records.if i pass the same value like %sym% again it is fetching same record). Whether the criteria will omit when it see %% as argument? 回答1: Hibernate does not escape special chars in like (e.g.

Bean Transaction Timeout in WebSphere using EJB Timer

依然范特西╮ 提交于 2021-02-07 13:38:51
问题 With JBoss/Wildfly one is able to use the @TransactionTimeout proprietary annotation and define a transaction timeout for a specific Session Bean. What is the equivalent way of doing it using IBM WebSphere ? We are using EJB Timer and one of the Beans will over an hour to complete. Sample code for Wildfly: import org.jboss.ejb3.annotation.TransactionTimeout; @Stateless @TransactionTimeout(value=7200) public class TimerBean { } Note: Using WebSphere 8.5. Modifying the global transaction time

Bean Transaction Timeout in WebSphere using EJB Timer

梦想与她 提交于 2021-02-07 13:38:36
问题 With JBoss/Wildfly one is able to use the @TransactionTimeout proprietary annotation and define a transaction timeout for a specific Session Bean. What is the equivalent way of doing it using IBM WebSphere ? We are using EJB Timer and one of the Beans will over an hour to complete. Sample code for Wildfly: import org.jboss.ejb3.annotation.TransactionTimeout; @Stateless @TransactionTimeout(value=7200) public class TimerBean { } Note: Using WebSphere 8.5. Modifying the global transaction time

Java EE 5 dependency injection?

99封情书 提交于 2021-02-07 06:17:21
问题 Since Java EE 5 does not have CDI, how does DI work in here? Can an EJB be injected with @EJB in a class that is a non-EJB? Can an EntityManager be injected with @PersistenceContext in a class that is a non-EJB (container managed not resource local EntityManager )? Or the only solution to bring the resources in non-EJB classes is by JNDI lookup? By non-EJB class I mean a class that is not annotated with @Stateless / @Statefull or others. 回答1: Taken from: http://www.oracle.com/technetwork