cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a resource bundle in EJB ?

Former Member
0 Kudos
234

Hi all,

I am trying to do the captioned task. However, when I package and deploy it using the deploy tool, it simply won't add the resources file to the <ejb>.jar or <ejb>.ear. Does anyone try this before?

Thanks in advance.

Best Regards,

Jacky

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Jacky,

I have some questions regarding your problem. If you can answer them I can give you better answer otherwise I'll supply some generic answer. Here are the questions:

Which version are you using ? Web AS 6.20 or 6.30?

When you use the Deploy tool to make the jars and assemble the ear did you add the resource files in the Files/Additional Files tab or you expect they to be included automatically?

In general the resource files have to be added explicitly, there is no easy way to find them and to decide automatically how to include them in the archives automatically.  To include the files just select the archive node in J2EE Components Tab, and then select the Additional Files (6.20), Files (6.30) tab to view the current files that will be included in the archive and change them.

To add a file:

6.20 ? From Files Panel just use browse button to navigate to file location and press add. You can change the place where the file will be located in the archive in Map Name field; by default it is in the root of the archive. If there are more then one resource files in one folder you can add them by selecting Directories node in the Files? tree and browse the directory. Again you can set a Map name, which specifies where in the archive this directory will be copied.

6.30 ? The same procedure ? the difference here is that the Bean classes also have to be explicitly specified; in 6.20 we tried to analyze the information in bean?s descriptor and the classpath but we?ve got too much special cases from developers and left the responsibility to them.

To add a file in an Ear the procedure is nearly the same - just select the EAR node in the Assembler tab and select the files as described above. In 6.20 the files panel is different but I believe you want have problems using it.

File content can not be changed in Deployer tab.

If you have more questions or problems for this issue I can contact you via e-mail.

Best regards,

Monika