mnrz [http://community.jboss.org/people/mnrz] created the discussion
Adding interface to an existing class
To view the discussion, visit: http://community.jboss.org/message/608679#608679
--
Hi
I have a class which is in legacy system
Hello
Each application exception will cause the transaction to be rolled back but
what if we set an interceptor say ExceptionInterceptor to catch all the
exception and set the error codes and messages to outgoing DTOs.
Because our DTO classes have a super class in which a response object is
skajotde wrote : My team problem like this resolve with inheritance.
|
|
Thanks Kamil
Actually we ended up with something like that. I've created a setter method for
EntityManager and in @PostConstruct method I set the entity manager, however I
don't like this sort of approaches but we
ALRubinger wrote :
| @Resource.mappedName ?
|
| S,
| ALR
Yes, I'm thinking of something like this:
|
| public abstract class GeneralDataAccessManipulator {
|
| @PersistenceContext(unitName = common-unit)
| EntityManager em;
| }
|
| @Resource(mappedName =
Hello
we have an interface say, DataAccessManipulator. since the method save(),
delete() and update() are common for all the DAO classes we have created a
GeneralDataAccessManipulator as an abstract class in which those methods have
been implemented using EntityManager:
| public abstract
jaikiran wrote : I understand what you are trying to do here. There was a
similar question sometime back on this forum
http://www.jboss.com/index.html?module=bbop=viewtopict=134276. See if using
@Resource as mentioned in that thread is a feasible approach. That way, each
application can have
ALRubinger wrote : Annotation metadata must be available to the compiler, so
it is impossible to inject this way if you depend upon a runtime value.
|
| If you're not using bleeding-edge builds (ie. trunk), you may instead look
up the EMF or EM in JNDI if you opt to bind them there:
|
Hi
I am going to create an interface named ReusablePool, this is considered to be
implemented as an object pool
now because our application may deploy in any application server such as
Glassfish or Websphere etc, depend on what our customer requires to be. so I
have to desgn it in a way so we
Hi
We are using EJB3.0 and my question is if there are any restriction or
programming tips to run our application in a clustered environment.
would you please share your experience with us or introduce any reference or
manual we can find it there
thanks
View the original post :
Hi
I need to know if there are any restriction or programming tip so our
application can be deployed in a clustered environment.
We are using EJB3.0 and webservices and also we have JMS in our application.
would you please share your experience on this issue.
thanks
View the original post :
Hi
We are using EJB3 and we've created an interceptor to check whether the user
has already sent a request or not.
if we noticed that the user has already sent a request then in this interceptor
we need to suspend that thread and wait till the former request being completed
otherwise the
any idea?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4154066#4154066
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4154066
___
jboss-user mailing list
Hi Experts,
I need your suggestions and idea regarding the scenario we have designed for
our EJB-based Banking system. I would appreciate if you give me advice and/or
share your experience on this.
In our Banking System, we've got a Central Bank Manager in which we have
provided all the bank
jaikiran wrote :
| You should be setting the id before calling persist. Why are you trying to
do that in a callback method?
|
thanks for your reply, the thing is that I want to calculate the ID from a
formula in which I use an algorithm. however, if I set any field other than ID
it won't
well, because my DAO classes may be called from any client and each developer
may call them from there codes so I don't want to compel them to calculate the
id each time they are using my service classes or force them to set some fields
that are not necessary from their point of view.
View
Hi all
I have an entity in which I need to assign my own ID to its primary key,
I put the code to extract the id and set it to the field in a PrePersist
method, however, the ejb validates the entity before calling that callback
method so the exception will be thrown
my question is where
sorry, I made a mistake
I should use instead of is not
:)
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4146047#4146047
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4146047
___
Hi all,
I have a simple query in which I want to select records that meet equality
condition with an Enum type.
select t from MyEntity t where t.statusType is not StatusType.NEW
StatusType is an enum contains NEW, SENT, ABANDONED
at first, it was an error, complained that unable to resolve
Thanks Xiaopang,
I will try it
It's near 4 months since I've started EJB3
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4136999#4136999
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4136999
Hi all,
I have a table that in a slice of time, many records may be deleted and
inserted. the record deletion is physically, this table acts as a pool.
now, I want this table uses deleted IDs for the new records that is going to
insert, in other words, if IDs say, 23, 55, 77 are deleted, when
xiaopang wrote : how about using sequence and set the sequence as cycle
would you please explain more? how to set it as cycle. is this working on all
databases or only specific DBs?
anyway thanks a lot
View the original post :
Hello experts,
I am going to use AspectJ and Spring in JBoss AS, would you please show me some
resources on how to configure AspectJ in JBoss?
Before we migrate to JBoss it was working good but now that we changed the
Application server it doesn't work.
and JBoss AS 4.2.1
thanks
View the
thanks pete.muir you showed me the way
I mark that method with
@TransactionAttribute(value=TransactionAttributeType.REQUIRES_NEW) and it works
fine
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4099574#4099574
Reply to the post :
shoud it be considered as a bug?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4097755#4097755
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4097755
___
jboss-user mailing list
Thanks pete.muir
yes before this exception another exception has been occurred but that is from
the database and it is another process and should not affect this process
here is the exception before:
| DEBUG - buildStoredQuery(85) | building StoredQuery object...
| Hibernate: insert into
Thank you very much indeed
just two questions.
if we mark the class with @Transactional, will it manage all transaction?
second, is this right?
| public int save(StoredQuery query) {
| try {
| em.getTransaction().begin();
|
Hi
though, I put the following tag in pages.xml but when this exception is
thrown, the specified message won't be displayed and an unexpected page which
is from the browser, is displayed instead.
| exception class=org.jboss.seam.security.AuthorizationException
|
Hello
I have a form in which some information will be saved or retrieved from
database. sometimes, when I am going to save new information, an exception from
database will prevent from inserting data, for example, in my case, a duplicate
entry exception is thrown
the problem is after this
ok
I voted for this issue, however, if this is a bug, I think they should have
fixed it in version 2
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4097691#4097691
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4097691
hi
how to allow access for a method to the users that have admin or member
role and prevent other roles.
we can't place more than one @Restrict on a method.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4095472#4095472
Reply to the post :
sorry I don't know whether this is right place to ask this or not
but I need to upgrade from 1.1.6 to 1.2 is there any migration guide like Seam
2 migration?
thanks
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4095474#4095474
Reply to the post :
Hi all
I have a question about @Unwrap.
I tried @Unwrap in a test application and as I understood, the whole bean will
play on behalf of the wrapped context variable.
for instance if I have method
| @name(bean)
| class MyBean {
|
| @Unwrap
| public User
Hi
I have a factory method for a field User in my SB, and I want to know why this
method is calling as many time as the number of User's field?
in my case, the User has 12 fields do this method is called 12 times whereas I
load it once from database ?
please take a look at following code:
Thanks Gavin, I found it really nice and useful document :)
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4095092#4095092
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4095092
___
Hi everybody,
I am using JBoss Seam and I'm bot sure whether this is an issue of the Seam or
EJB
my question is What an Stateless session bean in a Session scope means?
in other words, since a SLSB will loose its state after a client request has
been done if that bean defined in a session
Hi Christian,
but if I alter the STATELESS to SESSION my problem will changed, because I have
a combo box at the page and when the user change it the forms will be submitted
and the information of the selected user should be displayed.
if I use the SESSION scope for the factory method, at
I did what you suggest, but a:support doesn't resolve my problem.
first off, after calling the loadUser() by a:support nothing will be displayed
on page
second, apart from that, when the user clicks on the Save button, the form is
submitting but the thing is that (it seems) Seam doesn't
anonymous wrote : in what context did you read Stateless session bean in a
Session scope?
thanks for your reply,
as my previous post, I am using JBoss Seam, we can define an Stateless session
bean with scope Session. I think (I'm not sure) this will result in setting
that bean as an
I really stuck
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4094844#4094844
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4094844
___
jboss-user mailing list
Hi Fernando
sorry to revive this thread, but I have a problem in the above SB
I don't know why changes to fields at client-side is not being seen at
server-side. I mean when a user changes an item say, Phone no, and press the
Save button at server-side I can see the same value that field
anybody can help me please?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092845#4092845
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092845
___
jboss-user mailing list
the xhtml is already posted at first thread above and here is the backing bean:
| @Stateful
| @Name(userRegister)
| @Scope(ScopeType.SESSION)
| @Restrict(#{s:hasRole('Admin')})
| public class UserRegisterAction implements UserRegister {
|
| private Log logger =
Hi friends,
there is something strange! I have 6 text box in my page
username, password, password verify, phone no, address, mobile no
astonishingly, when I press Save button to update changes, at server-side only
changes to last text box is being seen and others remained intact and when I
thanks matt, but I couldn't see any question regarding binding a component,
in both link, and also the second link is for 2 version of the Seam I am using
1.1.6 and at the moment I can't upgrade to version 2.
thanks anyway
View the original post :
[EMAIL PROTECTED] wrote : You can't bind to a CONVERSATION scoped backing
component because the conversation context is not available in the RESTORE VIEW
phase.
thanks christian,
I put this as a FAQ in wiki page
View the original post :
now that binding exception has been gone but new problem is that at server-side
I get no changes and no value by binded components
I put following log at my backing bean
| logger.debug(contactNo.getLocalValue()+ -
+contactNo.getSubmittedValue()+ - +contactNo.getValue());
|
but two first
Hi everybody,
I have a SFSB in which I managed creating and editing user profile as follows:
| @Stateful
| @Name(userRegister)
| @Scope(ScopeType.CONVERSATION)
| public class UserRegisterAction implements UserRegister {
|
| private Log logger =
hello
I have some entity in my application, when I declare a method starting with
term is the database will be updated with a new field whereas I didn't
declare that field as a database field
here is an example:
| import static org.jboss.seam.ScopeType.SESSION;
|
| import
I put some log in my code, here is the result:
this is ExportDataUtil.exportToExcel() method:
| public void exportToExcel(String filepath,MapClass, IndexResultSet
indexResultSet,MapIndexCategory, ColumnHeaderListColumnHeader
columnHeaders) throws Exception {
|
sorry for the highlight color
| DEBUG building Excel's sheet is in progress...
| DEBUG --- 0
| DEBUG --- 1
|
| starting IndexSearchAction
| DEBUG destroying IndexSearchAction...
|
| DEBUG --- 2
| DEBUG --- 3
| DEBUG --- 4
| DEBUG --- 5
| DEBUG --- 6
| DEBUG --- 7
|
in the ExportDataUtil I used FileOutputStream to create related files on the
disk. Does this make the problem?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4085351#4085351
Reply to the post :
leave it out and do it yourself ;)
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4085359#4085359
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4085359
___
jboss-user mailing list
Hello,
I have a SFSB with an action method as follows:
| @Stateful
| @Name(searchResult)
| @Scope(CONVERSATION)
| public class SearchResultAction implements SearchResult {
| //code
|
| public String export() {
| if(!exportAvailable) {
|
as I read in javadoc it is stated:
captureCurrentView():
Capture the view id and page parameters from the current request and squirrel
them away so we can return here later in the conversation.
and
returnToCapturedView():
Redirect to the captured view, and end any conversation that began in
well, I checked the seam-gen but its login page and its authenticator is very
simple without any use of Redirect. could you give me the file name you are
meant?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4082568#4082568
Reply to the post :
[EMAIL PROTECTED] wrote : No transaction normally means that an earlier
exception has occurred. Use your debugger to see what goes wrong.
I really appreciate your nice comment, you show me the way, as you told, I
tried to comment out the code in authenticator and return true for every user
Hi
Does Seam provide a convenient component to write into output stream rather
than getting the request from the FaccesContext and producing the response
manually?
this usually is for downloading a file on a user request.
thanks
View the original post :
hello
I want to navigate from a page to my error page when an exception occurs, and
after going to error page, the user is able to click on back button to go
back to last page.
I am using Redirect.instance().captureCurrentView() and in my ErrorAction bean
in its back() method I called
I am stuck at this point. because I can't sign into my application I can't
develop it anymore !
any comment would be of great help
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4082322#4082322
Reply to the post :
Hi
I have an Authenticator component in my application and it was working fine
until yesterday and now it's treating weird, I had no changes since yesterday
but it throws following exception.
| Hibernate: select user0_.username as username3_, user0_.address as
address3_, user0_.group_id
can we inject an ejb component into authenticator using @EJB?
@EJB
private UserDao userDao;
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081206#4081206
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081206
Hi
I have a component in my application to authenticate users and it was working
fine until yesterday and now it's treating weird, I had no changes since
yesterday but it throws following exception.
| Hibernate: select user0_.username as username3_, user0_.address as
address3_,
BTW, I am using Tomcat and Embedded EJB
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081269#4081269
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081269
___
jboss-user mailing
Hi
could you find what is the problem on your exception? I am getting this
exception as well and I've stuck at this point :(
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081316#4081316
Reply to the post :
ok but why I get IllegalArgumentException: No transaction when I call
entityManager?
I also tried to call entityManager.getTransaction().begin and I get new
exception java.lang.IllegalStateException: JTA EntityManager cannot access a
transactions
View the original post :
any idea? :(
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081548#4081548
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081548
___
jboss-user mailing list
any other idea? :)
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4080725#4080725
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4080725
___
jboss-user mailing list
what simple :)
ok so it has an issue only with auto instantiation and not further benefits.
I thought a great usability for that.
thank you both for your reply
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4080757#4080757
Reply to the post :
fernando,
really thanks for your nice solution, it worked fine, but another problem
when I select a user the information is displayed correctly, now consider I am
changing some info say, address or contact number, how to manage this changed
data at server and synchronize the changed User with
yes, but saveCurrentUser() that you declared only updates the instance variable
user and the changes maded by user at client is not visible here. in other
words, when I click on submit the changes I've made, not binded to any variable
at server-side.
I'm not sure I could clarify myself or not
thanks Fernando, it works fine :)
with relaod, it works, but would you please tell me how this works?
as I understood, this @Factory will be called when at client-side an attribute
of that name is referred (for example tempUser)
and relaod flag compels loading the user only when my combobox
I had this problem in another page and after binding that component it worked
but here I have 6 text fields I don't want to bind all of them.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4080273#4080273
Reply to the post :
my User's scope is SESSION is this the issue which cause this problem?
because I just read somewhere in seam reference about @Role that we can define
many roles for an entity but I don't know how to use them?
View the original post :
Hello
I've read something in Seam reference about @Roles which you can define many
roles for an entity, a User stated as an example as follows:
| @Roles({
| @Role(name=user, scope=ScopeType.CONVERSATION),
| @Role(name=currentUser, scope=ScopeType.SESSION)
| })
|
ok, I know about it. Assume that we defined those roles, now, in our session
beans how we can use it?
for example, I have an Authenticator Session bean in which a User instance
variable is defined as follows:
|
| @Stateless
| @Name(authenticator)
| class Authenticator {
|
|
Hi
I have a SFSB as follows, it has an entity named user, in page when I change
a list box I want the selected user to be loaded but nothing will be displayed
| @Stateful
| @Name(userRegister)
| @Scope(ScopeType.SESSION)
| public class UserRegisterAction implements UserRegister {
|
#{userRegister.user} always returns value [EMAIL PROTECTED]
even after I set the user to new User() it won't change !!!
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4079591#4079591
Reply to the post :
any idea? :)
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4078640#4078640
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4078640
___
jboss-user mailing list
well, I didn't know about @RaiseEvent, I will try it
the thing that make me reluctant to use Event...raseEvent is that, in my
opinion, if you use this too much it will make your application complex and
hard to understand and debug it in future
anyway, thank you very much for your help,
matt.drees wrote : Probably what I would do is put an
@Observer(org.jboss.seam.postAuthenticate) method in your userSettings
component.
thanks matt.drees, it worked fine, but another problem came about, there are
three other component which depend on this unique component method. In other
Hello
how to handle all exception in a seam component. I am thinking of having an
stateless bean in which some action methods are defined so I can handle
exceptions regarding to its type and also provide some functionality such as
sending exception message to administrator by user, etc.
matt.drees wrote : I'm not sure what you mean.
well, let me explain more. when a user logged in, the application should find
which fields and categories he is allowed to search so I defined an action in
which a Map of accessible fields will be created. this map is creating after
authenticating
Hi
I have a Stateful session scoped component namely userSettings. I want when
user logged in its build method (annotated with @Create) being invoked.
first I marked it with @Startup but when the pages are loading this component
will load as well but at that time, there is no user logged in,
well, I meant in the same archive but different package
for example:
com.my.dao
SomeEjbBean.java
and
com.my.model
SomeOtherBean.java
but how about two archives (two different jar files)?
please note I am using embeddable EJB with Tomcat 5.5
thanks
View the original
Any Idea?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4073478#4073478
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073478
___
jboss-user mailing list
Hi all
I want to put different beans in different packages, for example, my ejbs to
perform the persistence operations in a package say dao and my jsf beans
regarding presentation layer in another package namely view but the problem
is that Seam doesn't know them, JBoss Seam only knows the
[EMAIL PROTECTED] wrote : To which server?
I am using Tomcat 5.5 and JBoss Seam v1.1.6
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4073481#4073481
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073481
HI
because we have to deploy our application in many servers with different
specifications and configurations, I need to have an external config file in
which I declare simply IP and connection url
the question is that how can I put these info into a file so jboss-beans.xml
read those
thank you all
but what if I use embedable EJB with Tomcat 5.5 ?
do you have any solution for that?
thanks again
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4073812#4073812
Reply to the post :
HI
because we have to deploy our application in many servers with different
specifications and configurations, I need to have an external config file in
which I declare simply IP and connection url
the question is that how can I put these info into a file so jboss-beans.xml
read those
Hi
When I log in using seam Authenticator, a message Welcome user_name will be
displayed
I can't find that message in any resource bundle. I want to display another
message with related language that user specified how can I remove that message
:))
I am using Seam v1.1.6
thanks
View the
No I have Messages.properties under the specific path
com.mypackage.bundle.Messages.properites
but the problem is it can't understand it
this is from Seam tutorial:
| You can select a different name for the resource bundle by setting the Seam
configuration property named
|
Thanks Fernando
yes you are right, so the Session timeout overrides the conversation timeout
thanks again
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4047779#4047779
Reply to the post :
Hello
I set the conversation timeout to a value representing 1 hour but after a
couple of the minutes the conversation will end
here is the line in component.xml
| core:manager conversation-timeout=360
| concurrent-request-timeout=500
|
Hi
I have a problem with security.
I am using JBoss Seam 1.1.6
when I press login button I encounter following exception:
| ERROR Servlet.service() for servlet Faces Servlet threw exception
| javax.faces.FacesException: Error calling action method of component with
id login:_id13
|
hello
I have some beans in one conversation (or rather some pages) but I want to use
another page which is in session scope and then back to last conversation and
resume the job but when I enter the session scope page after pressing the
button to go back it throws exception and tell me the
petemuir wrote : What you are saying makes no sense. Views aren't bound to
conversations or the session, components are.
well, I meant the same component, sorry I made mistake
I want to go to a page which has a component in session scope but when I want
to go back to conversation it says it
here is the component in session scope:
| @Stateful
| @Name(userSetting)
| @Scope(ScopeType.SESSION)
| public class UserSettingAction implements UserSetting {
|
| private Log logger = LogFactory.getLog(SearchResultAction.class);
|
| private ListString selectedItems;
|
I think I put @Begin in wrong place because when the session is creating it
will calls the @Create method and it is also lunches a conversation so this
conversation is different from the next one that I will lunch later
but I dont know, if I remove @Begin how can I notify to join to current
ok
here is the page that has a button to go to setting.xhtml:
| ?xml version=1.0 encoding=utf-8 ?
| !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
| html xmlns=http://www.w3.org/1999/xhtml;
|
1 - 100 of 152 matches
Mail list logo