What's going wrong is that none of the examples given above seem to work, and 
I'm wondering where exactly all that information needs to go.  Having the java 
code mixed in with the deployment descriptor doesn't really give me an idea 
where in the deployment descriptor the env-entry stuff should go.

I have a class that looks like this:


  | package com.webeprint.node.ejb;
  | 
  | @Service
  | public class NodeManagerBean implements NodeManager {
  |         String testParam = "origTestParam";
  | }
  | 

Then I'm setting up ejb-jar.xml to look like this:


  | <ejb-jar>
  |   <enterprise-beans>
  |   <session>
  |     <ejb-name>com.webeprint.node.ejb.NodeManager</ejb-name>
  |     <ejb-class>com.webeprint.node.ejb.NodeManagerBean</ejb-class>
  |     <env-entry>
  |       <env-entry-name>testParam</env-entry-name>
  |       <env-entry-type>java.lang.String</env-entry-type>
  |       <env-entry-value>newTestValue</env-entry-value>
  |       <injection-target>
  |         
<injection-target-class>com.webeprint.node.ejb.NodeManagerBean</injection-target-class>
  |         <injection-target-name>testParam</injection-target-name>
  |       </injection-target>
  |     </env-entry>
  |     </session>
  |   </enterprise-beans>
  | </ejb-jar>
  | 
  | 

I've tried this too:

  | <ejb-jar>
  |   <enterprise-beans>
  |   <session>
  |     <ejb-name>com.webeprint.node.ejb.NodeManagerBean</ejb-name>
  |     <ejb-class>com.webeprint.node.ejb.NodeManagerBean</ejb-class>
  |     <env-entry>
  |       <env-entry-name>testParam</env-entry-name>
  |       <env-entry-type>java.lang.String</env-entry-type>
  |       <env-entry-value>newTestValue</env-entry-value>
  |       <injection-target>
  |         
<injection-target-class>com.webeprint.node.ejb.NodeManagerBean</injection-target-class>
  |         <injection-target-name>testParam</injection-target-name>
  |       </injection-target>
  |     </env-entry>
  |     </session>
  |   </enterprise-beans>
  | </ejb-jar>
  | 
  | 


I've even tried this (which I didn't really expect to work, but I'll try 
anything at this point):


  | <ejb-jar>
  |   <enterprise-beans>
  |     <env-entry>
  |       <env-entry-name>testParam</env-entry-name>
  |       <env-entry-type>java.lang.String</env-entry-type>
  |       <env-entry-value>newTestValue</env-entry-value>
  |       <injection-target>
  |         
<injection-target-class>com.webeprint.node.ejb.NodeManagerBean</injection-target-class>
  |         <injection-target-name>testParam</injection-target-name>
  |       </injection-target>
  |     </env-entry>
  |     
  |   </enterprise-beans>
  | </ejb-jar>
  | 
  | 

I also tried many variations of examples #1 and #2, and none of them can get 
the job done.  What I need is:


  | testParam.equals("newTestValue") == true;
  | 

All I ever end up with is :



  | testParam.equals("origTestParam") == true;
  | 

I even tried leaving testParam unintialized in my class, but I just get a 
NullPointerException when trying to test the value of it.

So, I'm hoping that someone can post the full code for a simple class and 
ejb-jar.xml file that actually gets this to work. 

Thanks,
Jeremy

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3911319#3911319

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3911319


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to