java-ee

Ejb consumption in JDK1.4

时光毁灭记忆、已成空白 提交于 2019-12-25 02:23:01
问题 As a postlude to Consuming an EJB question. I have created an ejb on JBOSS AS 6.0 and am consuming it in a java client using the following code. private ServiceLocator(String host, String principal, String creadentials) throws NamingException { Properties env = new Properties(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); env.put(Context.PROVIDER_URL, "jnp://" + host); System.out

Spring controller setup question?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 02:00:15
问题 I am using Spring MVC to develop a Java webapp. I have a setup as follows: 2 pages of the site are responsible for rendering similar content. One of the pages simply renders the items slightly differently (and hence would need a different view), and pulls the data slightly differently (with a limit on the query instead of pulling all the items). My question is: would the best approach for this be to implement 2 separate controllers to handle each of these pages, or would it be better to use a

Websphere to Jboss migration

余生颓废 提交于 2019-12-25 01:56:02
问题 I need to migrate one of my application from Websphere(6.1) to JBoss (EAP 5.1) . Application is now using the following code to get the WebsphereTransactionManager object and perform suspend and resume operations com.ibm.ws.Transaction.WebSphereTransactionManager txMgr = com.ibm.ws.Transaction.TransactionManagerFactory.getTransactionManager(); javax.transaction.Transaction thisTx = null; thisTx = txMgr.suspend(); // Code to do non transactional operations txMgr.resume(thisTx); How could I get

Hibernate many-to-many data retrieval

帅比萌擦擦* 提交于 2019-12-25 01:47:16
问题 I have two objects User and Contact, with many to many relation, and I am using an intermediate table for this relation USER_CONTACT Saving the data in this association is fine, but the retrieval is an issue. I need to retrieve the data based on the User, but what I am getting is all the Contacts, for all the Users. It will be good if you can let me know what wrong I am doing. public class User { private Integer userID; private String userLoginEmail; private String password; private Set

wildfly quickstart fails from the offset

[亡魂溺海] 提交于 2019-12-25 01:22:09
问题 i just downloaded wildfly 9.02 with the quickstarts and the jboss developer studio. I am a total newbie to jboss, i am following the guide on github https://github.com/wildfly/quickstart/ to build and deploy the sources. i got my maven installed (v 3.3.3) with java 8. settings.xml copied to my $HOME/.m2 directory but it seems to me that the urls of the artifcats are all broken [ERROR] The project org.wildfly.quickstarts:wildfly-helloworld:10.0.0-SNAPSHOT (C:\jboss\quickstart\helloworld\pom

Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=168821248)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) error

牧云@^-^@ 提交于 2019-12-25 01:19:55
问题 Yesterday i was using oracle 9.1 with ojdbc 14 jdbc driver with following code for adding employee, it was working fine but now i am using oracle 10.1.0.2.0 with ojdbc14 but now it is giving following error Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=168821248)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) error Following is code for adding employee public static Connection getConnection() throws Exception { String driver = "oracle.jdbc.driver.OracleDriver"; String url

Vaadin: CDI Inject is null after referencing

感情迁移 提交于 2019-12-25 00:59:20
问题 Good day. There is an application (using a CDI add on): @VaadinScoped(VaadinScope.APPLICATION) public class AdminApplication extends AbstractCdiApplication { @Inject private Instance<Lang> lang; @Override public void init() { setMainWindow(new LoginWindow(this)); } public void authenticate(String login, String password) throws Exception { lang.get(). ... } ... And the LoginWindow: public class LoginWindow extends Window { ... public LoginWindow(AdminApplication application) { super(

Wildfly 15 external Artemis ActiveMQ destination not found

馋奶兔 提交于 2019-12-25 00:17:29
问题 I have a wildfly 15 with an external ActiveMQ and use a resource adapter. But i cannot get a connection to a queue to write on. But I can listen at the queue. here is my configuration: ironjacamar.xml: <admin-objects> <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/activemq/queue/HELLOWORLDMDBQueue1234"> <config-property name="PhysicalName"> activemq/queue/HELLOWORLDMDBQueue </config-property> </admin-object> </admin-objects> ra.xml: <adminobject>

Wildfly Artemis ActiveMQ lookup fail

▼魔方 西西 提交于 2019-12-25 00:15:58
问题 My lookup for a que fail. The que is registered in the wildfly and configured with ironjacamar.xml wildfly output on start: Bound JCA AdminObject [java:jboss/activemq/queue/HELLOWORLDMDBQueue] ironjacamar config: <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/activemq/queue/HELLOWORLDMDBQueue"> <config-property name="PhysicalName"> activemq/queue/HELLOWORLDMDBQueue </config-property> </admin-object> ra.xml: <adminobject> <adminobject-interface>javax

org.glassfish.jersey.server.ContainerException: java.lang.NoSuchMethodError: org.jvnet.mimepull.MIMEMessage.close()V

主宰稳场 提交于 2019-12-25 00:06:49
问题 I get this error when I do a POST with POSTMAN to my RestService, I searched and just appear libraries problem but i guess i have everything fine. Web.xml <web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"> <servlet> <servlet-name>Jersey Servlet</servlet-name> <servlet-class>org.glassfish.jersey.servlet.ServletContainer