473,378 Members | 1,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

EJB array fields

Hi everybody.

I have to make an entity EJB, one field of which should be an array of
Strings (for instance a Car EJB and one field should be a list of people who
have permission to use it).

Can somebody tell me in a few words what's the best way to model this?
Jul 17 '05 #1
2 2285

"Much as some folks hate to lose their way, me, I pray to God that I will."

"baba" <ba*************@yahoo.com> wrote in message
news:ci**********@bagan.srce.hr...
| Hi everybody.
|
| I have to make an entity EJB, one field of which should be an array of
| Strings (for instance a Car EJB and one field should be a list of people
who
| have permission to use it).
|
| Can somebody tell me in a few words what's the best way to model this?
|
|
You cannot have an array of Strings as a property of a CMP EJB, you will
need to create a PersonEJB and set up a one-to-many relationship from your
CarEJB to your PersonEJB.

Do you really need EJB for this? EJB is quite invasive of your code & quite
an overhead for something this simple. Have you looked at other persistence
mechanisms? Hibernate would be ideal for this http://www.hibernate.org/

--
-P
"Much as some folks hate to lose their way, me, I pray to God that I will."
Jul 17 '05 #2
Apologies for leaving part of my sig at the top of the last mail :-) In case
this threw you & you didn't scroll down to my answer, I've posted it again
here :-)

| You cannot have an array of Strings as a property of a CMP EJB, you will
| need to create a PersonEJB and set up a one-to-many relationship from your
| CarEJB to your PersonEJB.
|
| Do you really need EJB for this? EJB is quite invasive of your code &
quite
| an overhead for something this simple. Have you looked at other
persistence
| mechanisms? Hibernate would be ideal for this http://www.hibernate.org/
|
| --
| -P
| "Much as some folks hate to lose their way, me, I pray to God that I
will."
|
|
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul Kirby | last post by:
Hello All I am trying to update me code to use arrays to store a group of information and I have come up with a problem sorting the multiple array :( Array trying to sort: (7 arrays put into...
4
by: Michael Kirchner | last post by:
Hi everybody The output of my multiple dimension array is quite confusing. Im declaring an array, store some values in it and then I save the array in a session variable. On an other page I...
4
by: Mark Hannon | last post by:
I am trying to initialize an array only once so it can be seen & used by any functions that need it. As I understand it, if a variable is declared by itself outside of any functions, its scope is...
19
by: MMMMM | last post by:
Hmmm, my array seems to be emptying itself for no reason. I just want to grab every form element posted to the page into an appropriately sized array... What is going on here? dim arrShort()...
3
by: Ben | last post by:
Hi I am creating a dynamic function to return a two dimensional array from a delimeted string. The delimited string is like: field1...field2...field3... field1...field2...field3......
11
by: Geagleeye | last post by:
Hi, Im a rookie in vba, and therefor got a problem. i do have folwing records F G --------------- 2 3 2 5 6 7
5
by: sherifffruitfly | last post by:
Hi, I'm just learning cpp, and the exercise I'm working on is basically as follows: 1) Create a struct type with 4 members (char, char, char, int). 2) Create an array of, say 3 instances of...
0
by: josh.23.french | last post by:
Here's the code i have: $db = array(); //main array $db = array(); //table `main` $db = array('id'=>0, 'username'=>'joshfrench','userpass'=>'password','userlevel'=>'admin'); //row $db =...
11
by: Cliff Martin | last post by:
Hi, I am reading a fairly large file a line at a time, doing some processing, and filtering out bits of the line. I am storing the interesting information in a struct and then printing it out....
2
by: yeshello54 | last post by:
so here is my problem...in a contact manager i am trying to complete i have ran into an error..we have lots of code because we have some from class which we can use...anyways i keep getting an error...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.