Parameter « ejb « Java Enterprise Q&A





1. Configure EJB3 with web.xml like parameters    stackoverflow.com

I'd like to pass some parameters to a stateless session bean. I'd like to do something like I do when I configure a Servlet initial parameters in the web.xml file. Thanks ...

2. Is it wrong to pass EJBs as parameters to helper classes?    stackoverflow.com

I'm in the situation where I need to create a cache to store certains values which need to be updated from the database. Since this cache needs to be singular, some ...

3. Dynamically Get Properties Filename in EJB Jar (deployed in ear)    stackoverflow.com

When creating/deploying war files, I use a in my web.xml to define which property file to use:

<?xml version="1.0" encoding="UTF-8"?>
<web-app 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/web-app_3_0.xsd"
    version="3.0">
 ...

4. Could not locate named parameter    java-forums.org

I' ve two applciations developed using AndroMDA - struts, ejb, hibernate When i deploy them in jboss 4.2.3, one gives following error: Caused by: org.hibernate.HibernateException: could not locate named parameter [password] at org.hibernate.engine.query.ParameterMetadata.getNa medParameterDescriptor(ParameterMetadata.java:75) at org.hibernate.engine.query.ParameterMetadata.getNa medParameterExpectedType(ParameterMetadata.java:81 ) at org.hibernate.impl.AbstractQueryImpl.determineType (AbstractQueryImpl.java:390) at org.hibernate.impl.AbstractQueryImpl.setParameter( AbstractQueryImpl.java:376) at com.tcs.lms.entity.lmsUserInfoFactory.validateUser (lmsUserInfoFactory.java:72) at com.tcs.lms.services.LoyaltyManagementServiceBeanI mpl.handleValidateUser(LoyaltyManagementServiceBea nImpl.java:19) Hibernate cfg file generated by AndroMDA is : property name="connection.datasource">java:/jdbc/LMS ...